Skip to content

Commit c51f3b3

Browse files
committed
Fill the visual gap between the mask
1 parent 8f7ffa2 commit c51f3b3

File tree

1 file changed

+26
-15
lines changed

1 file changed

+26
-15
lines changed

src/components/blend/IPv4Network.svelte

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,22 @@ to augment IPv4 with Network and Netmask visualization
5656
}
5757
</script>
5858

59-
<small class="absolute mt-0.6 text-gray-400">
60-
<pre class="inline-block ml-2">Netmask:</pre>
61-
<div class="inline-block">
62-
<PartialTransition notation={renderedMask} fstDelimiter={' = '} />
63-
</div>
64-
</small>
65-
<small class="opacity-0">placeholder</small>
59+
<div class="relative">
60+
<small class="absolute text-gray-400 w-full">
61+
<div class="relative">
62+
<div class="absolute w-full h-full overflow-clip z--10">
63+
<div class="h-full bg-gray-200" style:width={`${(prefix / 32) * 100}%`} />
64+
</div>
65+
<div class="mix-blend-colo/r">
66+
<pre class="inline-block ml-2">Netmask:</pre>
67+
<div class="inline-block">
68+
<PartialTransition notation={renderedMask} fstDelimiter={' = '} />
69+
</div>
70+
</div>
71+
</div>
72+
</small>
73+
</div>
74+
<small class="opacity-0"><pre>placeholder</pre></small>
6675
<div class="relative">
6776
<div class="absolute w-full h-full rounded-b overflow-clip z--10">
6877
<div class="h-full bg-gray-200" style:width={`${(prefix / 32) * 100}%`} />
@@ -83,14 +92,16 @@ to augment IPv4 with Network and Netmask visualization
8392
/>
8493
</div>
8594
</div>
86-
<small class="mx-2 text-gray-600 absolute mt-0.6">
87-
<pre class="inline-block text-cyan">Network:</pre>
88-
<div class="inline-block text-cyan">
89-
<PartialTransition notation={renderedNetwork} />
90-
</div>
91-
<pre class="text-gray-400 inline-block lt-xs:hidden">= Address & Netmask</pre>
92-
</small>
93-
<small class="opacity-0">placeholder</small>
95+
<div class="relative mb-1">
96+
<small class="absolute mx-2 text-gray-600 mt-0.6">
97+
<pre class="inline-block text-cyan">Network:</pre>
98+
<div class="inline-block text-cyan">
99+
<PartialTransition notation={renderedNetwork} />
100+
</div>
101+
<pre class="text-gray-400 inline-block lt-xs:hidden">= Address & Netmask</pre>
102+
</small>
103+
<small class="opacity-0"><pre>placeholder</pre></small>
104+
</div>
94105
<Bits
95106
hideHeader={true}
96107
integer={network}

0 commit comments

Comments
 (0)