Skip to content

Commit 544dee0

Browse files
fix: add explicit width/height to navbar and marquee logo images
Without intrinsic dimensions the browser can't reserve space before images load, causing layout shift. Add width/height attributes to navbar logo SVGs and marquee brand logos.
1 parent e71479b commit 544dee0

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

src/components/Navbar.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,15 @@ const LogoSection = ({
119119
<img
120120
src={'/images/logos/logo-black.svg'}
121121
alt=""
122+
width={30}
123+
height={30}
122124
className="row-start-1 col-start-1 w-full dark:opacity-0 opacity-0 group-hover:opacity-100"
123125
/>
124126
<img
125127
src={'/images/logos/logo-white.svg'}
126128
alt=""
129+
width={30}
130+
height={30}
127131
className="row-start-1 col-start-1 w-full light:opacity-0 dark:block opacity-0 group-hover:opacity-100"
128132
/>
129133
</div>

src/components/TrustedByMarquee.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ export function TrustedByMarquee({
5555
alt={brand}
5656
loading="lazy"
5757
decoding="async"
58-
className="max-w-24 max-h-14 w-auto h-auto object-contain opacity-50 grayscale hover:opacity-100 transition-all duration-200 dark:invert dark:opacity-70 shrink-0"
58+
width={96}
59+
height={56}
60+
className="max-w-24 max-h-14 w-24 h-14 object-contain opacity-50 grayscale hover:opacity-100 transition-all duration-200 dark:invert dark:opacity-70 shrink-0"
5961
/>
6062
) : (
6163
<span

0 commit comments

Comments
 (0)