Skip to content

refactor(spacing): tokenize arbitrary odd-pixel drift, preserve dense micro-scale (audit #14) - #87

Merged
HomenShum merged 1 commit into
mainfrom
claude/brave-einstein-e177ab
Jun 29, 2026
Merged

HomenShum merged 1 commit into
mainfrom
claude/brave-einstein-e177ab

Conversation

@HomenShum

Copy link
Copy Markdown
Owner

Web-design audit #14 — spacing, resolved with a correction to the audit's own premise

The audit framed 7/9/11/13/22px as "drift to snap to the 8pt grid." On inspection that premise is partly wrong: the compact chips/pills/tags run on a deliberate dense-UI micro-scale (2/5/6/10px, Attio/Linear-class) where 8pt snapping would bloat tight elements — a regression, not a fix.

So #14 was executed surgically:

  • Tokenized only the genuinely-arbitrary odd-pixel values (7 to --space-2, 9 to --space-2, 11 to --space-3, 13 to --space-3), value-side of spacing properties only (padding/margin/gap families) — 127 replacements, shorthand position preserved.
  • Preserved the intentional dense micro-scale (2/5/6/10) and the >=2px-snap values (14/18/22) — optical tuning, not drift.
  • Excluded negative offsets (-7px avatar overlap — -var() is invalid CSS) and decimals.
  • No new tokens (unused tokens violate cleanliness-by-subtraction) — reused the existing scale only.

Verification: vite build passes (22.49s, valid CSS); tokens resolve live (--space-2=8px, --space-3=12px); dense surfaces visually unchanged in ?mode=memory; zero console errors. Audit doc updated with the resolution log — all 20 items now shipped.

🤖 Generated with Claude Code

… micro-scale (web-design audit #14)

The audit framed 7/9/11/13px as drift to snap to the 8pt grid. On inspection that
premise is partly wrong: compact chips/pills/tags run on a deliberate dense-UI
micro-scale (2/5/6/10px, Attio/Linear-class) where 8pt snapping would bloat tight
elements. So #14 is executed surgically:

- Tokenize only the arbitrary odd-pixel values (7->--space-2, 9->--space-2,
  11->--space-3, 13->--space-3), value-side of spacing props only (padding/margin/gap).
  127 replacements, shorthand position preserved.
- Preserve the intentional dense micro-scale (2/5/6/10) and >=2px snaps (14/18/22).
- Exclude negative offsets (-7px avatar overlap; -var() is invalid CSS) and decimals.
- No new tokens (would be unused) -- reuse the existing scale only.

Build-clean; tokens resolve (--space-2=8px, --space-3=12px); dense surfaces
visually unchanged (live-verified ?mode=memory, zero console errors).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@vercel

vercel Bot commented Jun 29, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
noderoom Building Building Preview, Comment Jun 29, 2026 3:32am

Request Review

@HomenShum
HomenShum merged commit dbfd6fe into main Jun 29, 2026
2 of 6 checks passed
HomenShum added a commit that referenced this pull request Jun 29, 2026
…PRs #71-#87)

The demo-room-mobile baseline was last captured 2026-06-16 (6a86863), before the
entire web-design audit program landed (~15 styles/layout commits). It was failing
on a cumulative vertical reflow, not a functional break: actual render verified
correct (all surfaces present, mask region intact). Desktop + blank-room already
passed. Regenerated against the current served build; full design-baseline green (3/3).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
HomenShum added a commit that referenced this pull request Jun 29, 2026
test(design-baseline): refresh stale mobile snapshot (predated audit #71-#87)

This branch was successfully deployed

1 active deployment
Preview — 9d8738d6 Deployed Jun 29, 2026 by vercel[bot]
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.

1 participant