generated from subdomains/SubdomainTemplate
sky: CSS out of the JavaScript and into sky/css/ (+ smoke test, hook fixes) #5
Loading…
Reference in a new issue
No description provided.
Delete branch "skizy/css-tidy"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The despaghettification, part 1: CSS lives in CSS files now, not in JavaScript strings.
What changed
Sky.css('…' + '…')blocks (about 200,000 characters of CSS written as JavaScript strings, across 40 files) are now real stylesheets,sky/css/<name>.css, one per piece, named after its script. They're formatted likesky/sky.css, and Victor's comments are kept as CSS comments.<head>of every page that loads its script: right before</head>, after the page's own<style>, in script order. That's the same place and order the scripts used to add them, so the cascade is unchanged, and render-blocking links mean no flash of unstyled content.Sky.css. It genuinely needs the address of Victor's font file, which only exists once he adds one.room/davinv.js) linksinventory.cssandloot.css, since those scripts don't add their styles any more.CLAUDE.md: a "Where the styles go" section (so no Claude goes back to writing CSS in strings), the smoke test under Testing, and the?v=rule coveringsky/css/.?v=bumped to20260927b.Two tooling fixes found on the way (both harmless on Windows)
tools/hooks/pre-commitwasn't executable, so on Linux/Mac git skipped it silently, and commits made there never refreshed the lists or the catalogue. Fixed (mode +x).tools/update-lists.shnow cataloguessky/css/*.css, so visitors' browsers refetch changed stylesheets. It also sorts in byte order (LC_ALL=C, capitals first, the way Git Bash already did), so a commit from Linux doesn't reshuffle every list.How it was checked
tools/smoke.py(from #4, included here, so #4 can be closed): every page and room, all 8 resets, loads with no script errors or missing files.--stillpictures: the clock, chance, every animation and the outside world held still. Two runs of the same code are pixel-identical. Before vs after this change, all 8 resets × 13 pages match, apart from known timing jitter (the self-typing text on the sea, the clock needle, rooftop window twinkles).🤖 Generated with Claude Code