Skip to content

fix(css): scope terminal rules, layer utility classes, add font and ease tokens - #256

Merged
yigitdot merged 2 commits into
mainfrom
claude/css-file-review-24bcaa
Sep 28, 2026
Merged

yigitdot merged 2 commits into
mainfrom
claude/css-file-review-24bcaa

Conversation

@yigitdot

@yigitdot yigitdot commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

This comes from a review of app/globals.css against every component. It looked for styling that belongs in the stylesheet, cascade bugs, dead CSS, and repeated literals that should be tokens.

Fixes (visible)

  • Terminal rules were global. .prompt, .arrow, .ok (and .hash, .dim, .amount, .progress, .cursor) weren't scoped to .terminal. The .arrow rule leaked onto the → in every a.underline-brutal link (Hero, Contact), making it permanently green, 600 weight and followed by a stray 6px gap. As a result a.underline-brutal:hover .arrow { color: whisper } never had a visible effect. They're now scoped under .terminal, including the reduced-motion block, so it still wins on specificity.
    • Hero and Contact arrows now sit in the text colour at rest and turn green on hover. a.underline-brutal .arrow keeps an explicit 6px right margin, which is the room its hover nudge slides into.
    • The terminal and the CTA arrow look the same as before.
  • Unlayered .meta / .hug beat every utility next to them. They now live in @layer components.
    • MethodRow's tracking-[-0.05em] now applies. It had silently rendered at -0.04em.
    • Removed the redundant tracking-[-0.04em] on .hug elements.
    • Removed the dead font-normal on .meta <th>s, so they keep today's weight of 500.
    • The Method stack role label is now meta text-[12px] instead of spelling .meta out by hand.
    • .rule / .rule-2 moved into the layer as well.
  • One shared focus ring. :where(a, button):focus-visible in @layer base replaces 4 copied rules. It also gives the dashed ring to links that had no rule before (Hero/Contact links, footer, blog, drawer rows). The CTA and prose links keep their own rings.

Tokens and cleanup (no visual change)

  • --font-sans and --font-mono go in @theme. The mono stack was copied 5×, and html, body now uses var(--font-sans).
  • Easing tokens --ease-expo, --ease-soft and --ease-term replace about 37 cubic-bezier literals. The drawer uses Tailwind's built-in --ease-in-out, which is the same curve.
  • .meta uses var(--text-micro), and SectionHeader uses text-micro instead of text-[11px]. Same value.
  • The footer presskit link's inline style becomes border-b border-current pb-[2px], matching the nav links.
  • Removed the unused .blend class.
  • Removed the leftover --mm-i variable (MobileMenu and types/css.d.ts). Its stagger rule was removed in feat(mobile-menu): fill the viewport when the drawer opens #189.
  • Updated the comments that described .meta as unlayered.

Left out on purpose

  • The OG image inline styles stay, because Satori requires them.
  • The per-instance custom properties (--reveal-delay, --level, --faq-n) stay inline.
  • Not done here: merging the .terminal-* and .fleet-* head/dot/label rules, a panel-shadow token, and a z-index scale.

Test plan

  • pnpm lint, pnpm typecheck, pnpm format:check
  • pnpm test: 510/510
  • pnpm build, including check:out and check:og-image
  • Dev server, computed styles:
    • Hero arrow is ink at rest; terminal arrow is whisper.
    • Method h3 is -0.05em.
    • Compare <th> stays at 500.
    • Stack role keeps 12px / 1.2 / 500 / 0.22em.
  • Tabbing gives a 1px dashed ring on Hero links and drawer rows; the CTA keeps its 9px ring. The drawer opens and closes.
  • Reduced motion: I checked in the stylesheet that the terminal rule matches the scoped selectors, but haven't watched it with reduced motion turned on in a browser.

🤖 Generated with Claude Code

Copilot AI lite review requested due to automatic review settings September 28, 2026 02:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

@yigitdot
yigitdot merged commit 9aad1db into main Sep 28, 2026
6 checks passed
@yigitdot
yigitdot deleted the claude/css-file-review-24bcaa branch September 28, 2026 03:01
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