Commit 08bf992
fix: Set width:auto so the logo is not stretched by its own attributes
The previous commit did not fix this and the reasoning behind it was wrong.
width/height attributes are presentational hints that set a real width, not
merely an aspect-ratio hint. The rule sets height:22px and never width, so the
attribute's 199px won over auto and the logo was drawn 199x22 instead of
145.92x22 -- stretched by 36%. Removing the padding in the previous commit made
it worse, because the padding had been accidentally shaving 20px off that 199.
width:auto hands sizing back to the aspect ratio the attributes imply. Measured
over CDP against the built stylesheet: content box 145.92x22 and -0.01%
distortion, identical to production. With the image request blocked the box is
still 145.92x22, so the space really is reserved before the image arrives, which
is the point of the change.
The margin-right from the previous commit stays: aspect-ratio sizes the
border box, so padding would still be counted inside the ratio.
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 8571350 commit 08bf992
1 file changed
Lines changed: 12 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
50 | 57 | | |
51 | 58 | | |
| 59 | + | |
52 | 60 | | |
53 | 61 | | |
54 | 62 | | |
| |||
0 commit comments