You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Land the hand-written spacing on the v2 ladder (#205)
ui/src wrote 23 arbitrary spacing values by hand across fourteen
distinct numbers — gap-[7/9/10px], px-[9/10/13px], py-[1/6/7px],
pt-[2/10/11px], pb-[3px], mt-[7/9px], inset-[2px], inset-x-[1px],
inset-y-[4px]. spacingRoles.test.js counted them and stopped the number
growing, and said outright that landing them on a ladder was the real
answer and needed a mockup set and the owner naming one.
Both happened. .mockups/spacing-scale/all.html rendered four directions
against a v0 reference and v2 was chosen: ladder 0/4/8/16, sub-4 nudges
deleted rather than rounded, and no 12. The mapping is 1,2,3 -> 0;
4 -> 4; 6,7,9,10,11 -> 8; 13 -> 16.
All 23 sites are now Tailwind scale utilities. The rem base is 16px —
the 14px font-size is on body, not html — so gap-2 is 8px, px-4 is 16px
and inset-y-1 is 4px.
--sp-ledger-inset goes 11px -> 8px with them. It was extracted at its
rendering value on purpose, because naming a value and moving it are two
different jobs and docs/SCREENS.md puts the second behind a variant set
and a pick. This is that pick. 8px rather than 12px because 12 is not on
v2's ladder and everything from 6 to 11 lands on 8.
That move is safe in the direction it went: shrinking the inset gives
each ledger cell 6px more room inside a LANE_COLS track whose width did
not change, so nothing can overflow. Growing it is what would squeeze
contents out of a column sized for them, and a future move upward has to
bring LANE_COLS with it.
CENSUS is now empty, which makes ARBITRARY_BUDGET 0. The ratchet fails
on the FIRST new arbitrary spacing value rather than the twenty-fourth.
That tightening is deliberate: there is no longer a backlog for a new one
to hide in, and a genuine one-off still gets in by adding its line with
its reason.
One guarantee got WEAKER as a side effect and is restored explicitly.
At 11px the ledger token's value was distinctive, so a cell that drifted
off it had to write px-[11px] and the ratchet caught it. At 8px the value
collides with px-2, so a drifted cell renders pixel-identically through
an ordinary utility that nothing would flag — and the existing four-use
count does not cover it either, since a FIFTH cell written with px-2
leaves that count at four. spacingRoles.test.js now asserts every
ledger-cell class string also carries px-[var(--sp-ledger-inset)], with a
fixture proving the check fails against a cell written with px-2.
tests/dossier-page.spec.ts already reads the token at runtime and asserts
every .ledger-cell paints exactly it, so the ledger alignment was guarded
at 8px without changing that spec at all.
Co-authored-by: NOC Dashboard <noc-dashboard@users.noreply.github.com>