Skip to content

Commit cd405bc

Browse files
committed
fix(docs): scale navbar slanted borders with container height
The slanted SVG borders bridging the navbar's left and right pill containers were sized with fixed pixels (w-[24px] h-[60px] / xl:w-[29px] xl:h-[72px]). When users scale Chrome's default font size above 16px, rem-based content inside the nav grows but the SVGs stay fixed, leaving a visible wedge of page background at the top of the join. Switch to h-full w-auto so the SVGs follow the container's actual height while preserving their viewBox aspect ratio.
1 parent e7391e2 commit cd405bc

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

docs/components/layout/navbar.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,14 +208,14 @@ const Navbar = ({ pageTree }: NavbarProps) => {
208208
alt="Slanted end border"
209209
width={29}
210210
height={72}
211-
className="hidden -ml-px dark:inline-block shrink-0 w-[24px] h-[60px] xl:w-[29px] xl:h-[72px] object-cover"
211+
className="hidden -ml-px dark:inline-block shrink-0 h-full w-auto object-cover"
212212
/>
213213
<Image
214214
src="/images/navbar/slanted-end-border-light.svg"
215215
alt="Slanted end border"
216216
width={29}
217217
height={72}
218-
className="-ml-px dark:hidden shrink-0 w-[24px] h-[60px] xl:w-[29px] xl:h-[72px] object-cover"
218+
className="-ml-px dark:hidden shrink-0 h-full w-auto object-cover"
219219
/>
220220
</div>
221221

@@ -225,14 +225,14 @@ const Navbar = ({ pageTree }: NavbarProps) => {
225225
alt="Slanted start border"
226226
width={29}
227227
height={72}
228-
className="hidden -mr-px dark:inline-block shrink-0 w-[24px] h-[60px] xl:w-[29px] xl:h-[72px] object-cover"
228+
className="hidden -mr-px dark:inline-block shrink-0 h-full w-auto object-cover"
229229
/>
230230
<Image
231231
src="/images/navbar/slanted-start-border-light.svg"
232232
alt="Slanted start border"
233233
width={29}
234234
height={72}
235-
className="-mr-px dark:hidden shrink-0 w-[24px] h-[60px] xl:w-[29px] xl:h-[72px] object-cover"
235+
className="-mr-px dark:hidden shrink-0 h-full w-auto object-cover"
236236
/>
237237

238238
<div

0 commit comments

Comments
 (0)