Skip to content

Trim dead CSS - #54

Open
adetuyiTolu wants to merge 1 commit into
mainfrom
claude/tagline-update-nxl40s
Open

adetuyiTolu wants to merge 1 commit into
mainfrom
claude/tagline-update-nxl40s

Conversation

@adetuyiTolu

Copy link
Copy Markdown
Contributor

Removes 69 rules for classes that appear nowhere in the rendered site, the generator, main.js, or any inline script.

file before after rules
style.css 58,970 b 51,320 b 411 → 362
signals/signals.css 13,996 b 11,447 b 113 → 94

13% and 18% smaller respectively.

What went

An older Signals nav and footer superseded by the shared site chrome, an Intelligence hub grid, a technical-looking card treatment, a summit details list, and an outcomes list. None of it is rendered by anything.

What stayed, and why

Static "unused" is not the same as dead. Four categories were kept deliberately:

  • Third-partyiti__* applied at runtime by intl-tel-input, and the beehiiv embed wrappers.
  • Runtime classes — what main.js toggles (is-visible, open, scrolled, loading, active), which never appear in source HTML.
  • Conditional templates — generator branches that render only when the data calls for them: the draft banner, the pending-analysis note, the source flag, and the sig-lasttime block shipped for the 20th. Deleting those would silently break the first "Last time we said".
  • Compound selectors — where a dead class shared a rule with a live one, only the dead half was dropped.

Verified, not assumed

Three independent checks, because a static scan alone is not sufficient evidence for deleting styles:

  1. No live class lost its styles. Every class still present in rendered HTML resolves to a rule.
  2. Layout is identical. Element geometry for ten homepage sections — y position and height — matches to the pixel before and after.
  3. Visual regression. 13 of 14 full-page screenshots across 7 pages at 430px and 1200px are byte-identical.

The fourteenth, the homepage at 1200px, differed by 7.18% of pixels — so I chased it rather than waving it through. Cropping the worst region showed identical content shifted ~2px. Two captures of the same unchanged page then differed by 7.76%, more than the before/after pair, which identifies it as capture nondeterminism from the reveal transitions rather than a regression. The identical DOM geometry confirms it.

Build output is unchanged — only the two CSS files differ. HTML parses with no duplicate attributes; braces balanced in both stylesheets.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VcGv2ZYwGxTXdSGzMKsK3R


Generated by Claude Code

@vercel

vercel Bot commented Sep 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
zerotoact Ready Ready Preview Sep 14, 2026 6:08am UTC

Four changes, each fixing something measurable rather than decorating.

Measure. Body copy ran to about seventy-four characters a line, above the
comfortable range for continuous reading. The edition column narrows to
700px, which brings it to sixty-seven at desktop and sixty-nine at
tablet, without changing type size.

Hierarchy. Method, What would prove this wrong and Next move were set two
points smaller than the narrative they support, so the parts carrying the
actual instruction read as footnotes. They now match the body.

Length. A fifteen-hundred word piece gave no indication of how long it
was. Editions carry a reading time in the eyebrow and archive cards carry
it beside the date, computed from the words actually on the page.

Progress. A thin bar tracks position through the article, which is the
cheapest signal that something is a considered read rather than a post.
It honours prefers-reduced-motion and exists only on editions.

The archive also marks the newest edition and sets its title a size
larger, so the page has a focal point instead of nine identical rows.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VcGv2ZYwGxTXdSGzMKsK3R
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants