Commit 14292cc
fix: enforce explicit logo height + tighten shell dimensions
Two follow-ups to #433 against the persistent CLS 0.975 issue.
## 1. Logo: max-h-24 → h-24 (explicit height)
Lighthouse continued to attribute the layout shift to the header logo
even after #431 added width="218" height="96" attributes. Root cause:
Tailwind's preflight resets all images to `height: auto`, which
overrides the HTML height attribute. `max-h-24` only caps the height,
it doesn't enforce one — so before the image loads, the rendered
height is `auto` (= 0). When the PNG actually loads, the header grows
by 96px and pushes everything below.
`h-24` (height: 6rem) explicitly sets the height in CSS, overriding
preflight's `auto`. Combined with `w-[218px]` (and the matching
mobile sizes), the browser reserves the exact box from first paint.
## 2. Shell-header / shell-footer dimensions match the rendered ones
The static skeleton in #433 used min-height: 10.5rem for the header
placeholder, but the real <header> renders at ~8.75rem (140px:
py-3 + h-24 logo + slogan + border). When hydrateShell() replaced
the placeholder, the header shrank by ~28px and #page-content moved
up by the same amount — a small but real shift on top of every other
load contribution.
Tighten the placeholders to match: header 8.75rem, footer 6rem (already
correct), and update #page-content min-height accordingly.
These are smaller contributions than the cards-loading shift, but they
clean up the easily-fixable signal first so the next Lighthouse run
isolates the remaining CLS to the actual hard problem.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 16eccc4 commit 14292cc
2 files changed
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
80 | | - | |
81 | | - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| |||
0 commit comments