Repository navigation
Commit 242f0c5
Budget the CSS a browser downloads, not the file on disk
The raw-byte budget failed on the token refactor: 71,492 bytes before,
78,377 after. But measured on the same two builds, gzip went 13,366 ->
13,125 and brotli 11,417 -> 11,242. Hundreds of repetitions of
var(--space-8) compress better than seventy distinct arbitrary values,
so the change made the transferred stylesheet smaller while making the
file bigger.
Raw bytes were never what ships -- Cloudflare serves this compressed. So
gzip becomes the real budget and gets tighter than the size it was
already passing at: 14,000, down from 16,000.
The raw check stays as a backstop rather than the headline number, for
the case a stylesheet balloons through copy-paste yet still compresses
well. Its ceiling moves to 88,000 to sit above what token references
legitimately cost.
Loosening a threshold that my own change tripped deserves the numbers in
writing, which is why they are in the comment.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 1666c01 commit 242f0c5
1 file changed
Lines changed: 14 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
299 | 310 | | |
300 | | - | |
301 | | - | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
302 | 314 | | |
303 | 315 | | |
304 | 316 | | |
| |||
0 commit comments