Repository navigation
feat: spacing grid with a ratcheted gate (Feature #386) - #1164
Merged
Merged
Conversation
added 3 commits
November 20, 2026 17:48
Padding, margin, gap and inset sit on one scale, 0, 2, 4, 8, 12, 16, 20, 24, 32, 40 and 48 px, as --wv-space-* tokens in the block at the top of public/style.css, with --wv-nudge for a 1 px offset that keeps a border, a chip or a line box on its line. DESIGN.md gains a Spacing section. - Every odd spacing value in style.css (206) and chip.css (18) moves to the scale: gaps and horizontal insets round to the nearest step, vertical insets round down so no row grows, and 1 px offsets become --wv-nudge (39 in style.css, 8 in chip.css, which writes var(--wv-nudge, 1px) for applets and exports). - Grid cells of every kind start their text 12 px in, where their column header's label starts: --wv-cell-text-x is 8 px less the dressed box's 1 px border, and the header label takes 8 px. Name and Description were 4 and 7 px in. - test/space-scale.test.mjs refuses odd values and holds test/space-baseline.json: odd 0 in style.css and chip.css; raw pixels off the scale 445 in style.css (632 before) and 10 in chip.css (28). status.css keeps its own spacing (19 odd declarations, 39 off scale). - test/grid-cell-inset-browser.test.mjs failed before the change at every density: the Name cell started 9.5 px in under a header at 4.5. ponytail: - The remaining off-scale values are mostly 6, 10 and 14 px, which have no step. Upgrade path: follow-up sweeps that move them onto 4, 8, 12 or 16 and lower the baseline, one surface per PR. Change-Id: Iaab4e4478718766bd982f079174cd169a31454ed
- Rating icons stay 1 px apart through --wv-nudge, the gap the column width is computed from. - TOGGLE_METRICS reads the toggle's new 8 px gap. - A focused grid cell still grows 4 px each way: its vertical pad is the 4 px step plus the nudge. - The phone grip keeps its 13 px bleed through the 12 px step plus the nudge, so it spends no layout. - Tile field rows take the 2 px half step, which keeps the phone pick's 44 px hit area clear of the row under it. - The tight New button is a 28 px square with no padding. - Suites that pinned 5, 7 and 3 px gaps read the 4 and 8 px steps. No-changelog: changelog.d/spacing-grid-386.md on this branch covers Feature #386 Change-Id: Ic658a5c777bb664540f6648fdd3d30d7d6764dc6
- Date inputs and checkboxes in the grid start where their headers' labels start, 12 px in, like every other cell; the inset test now covers both. - The date box's fit reads its own padding and border instead of a 22 px constant, and a date column's floor adds 1 px, which WebKit's input text needs over the span that measures it at the wider inset. No-changelog: changelog.d/spacing-grid-386.md on this branch covers Feature #386 Change-Id: Ib521ae3193ca50bd5a75ea035b0179a4608d9a8e
grunion-ai
enabled auto-merge (squash)
November 20, 2026 23:50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tracker: Feature #386 (https://weave.grunion.ai/w/weave/e/aef3d9ed-a3a3-4629-9744-034dda41781b), part of Issue #1864.
What changed
--wv-space-*tokens in the block at the top ofpublic/style.css, plus--wv-nudge(1 px) for an offset that keeps a border, a chip or a line box on its line. DESIGN.md gains a Spacing section.style.css(206 values in 176 declarations) andchip.css(18) is gone. Gaps and horizontal insets round to the nearest step, vertical insets round down so no row grows, and 1 px offsets become--wv-nudge(39 uses in style.css, 8 in chip.css, which writesvar(--wv-nudge, 1px)for applets and exports).--wv-cell-text-xis the 8 px step less the dressed box's 1 px border.TOGGLE_METRICSreads the toggle's new 8 px gap, a focused cell still grows 4 px each way, the phone grip keeps its 13 px bleed, the tight New button stays a 28 px square, and a date column's floor and fit read the wider inset. Row heights and density tokens are untouched.Gate
test/space-scale.test.mjsreads padding, margin, gap, inset, scroll-padding, scroll-margin and the--*pad*,--*gap*,--*inset*custom properties inpublic/*.css. It refuses odd pixel values and ratchets raw pixels off the scale intest/space-baseline.json; both counts may only fall.The 445 left are mostly 6, 10 and 14 px, which have no step; follow-up sweeps lower the baseline one surface at a time.
Tests
test/grid-cell-inset-browser.test.mjsfailed on main at all three densities (the Name cell started 9.5 px in under a header at 4.5 px) and passes here.render-budget type-doc|phone, which fails the same way on main locally and runs on the trend lane.