feat(theme): retune the container scale to one geometric rhythm - #825
Merged
Conversation
The container scale was two grids spliced together: it stepped +32, then +64, then +96, then +128, so neighbouring sizes were 12% apart at the bottom and 11% apart at the top with a visible seam in the middle. Picking a container size meant knowing where you were on the list rather than how much wider you wanted. It is now anchored at both ends - 3xs stays 256px (the narrowest useful field rail), 7xl becomes 1620px (the widest page measure) - with the eleven slots between them at 256 x r^n, r = (1620/256)^(1/12) ~ 1.1662. Every neighbouring pair sits ~+16.6% apart, so one step always means the same relative jump. Values round to the 4px grid rather than 8px because 1620 is not a multiple of 8 and the anchor defines the grid; 4xl is nudged 4px to land on 1024, a landmark worth keeping. Ratio between neighbours ranges 1.157-1.172.
The drawer size summaries annotated each width with a container token
("384px (container-sm)"), but a drawer is sized against the viewport it covers,
not against a reading measure, and its widths are literals that do not move
with the scale. After the retune the annotation was simply wrong - container-sm
is 408px. Drops the annotation rather than the value.
The Popover width story quotes the container tokens it really does use, so
those px figures are refreshed to the new scale.
…etune 42 snapshots move, not the broad sweep expected. Every one is a story wrapper or a trigger sized off the scale: Textarea (max-w-sm, 384->408), PickList (container-xl, 576->644), ScrollArea (container-md, 448->472) and the Calendar two-part trigger (container-xs, 320->348). No baseline was added or orphaned. Worth recording why it is only 42. Popover, Dropdown, Tooltip, Panel, Dialog, Table.Filter and Table.ColumnSelector all size their panels from container tokens, so this commit changes their rendered widths - but every one of those stories snapshots the trigger CLOSED, so none of them moved and none of those width changes is verified by anything. That is a pre-existing gap in the overlay stories, not something this retune introduced, and closing it means adding open-state stories across seven components - well outside a token change. Generated on ubuntu-latest via app-storybook-generate-baseline.
robsongajunior
approved these changes
Jul 29, 2026
isaquebock
approved these changes
Jul 29, 2026
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.
Summary
The container scale was two grids spliced together: it stepped
+32, then+64, then+96, then+128. Neighbouring sizes sat 12% apart at the bottom and 11% apart at the top with a visible seam in the middle, so picking a container size meant knowing where you were on the list rather than how much wider you wanted.It is now anchored at both ends —
3xsstays256px(the narrowest useful field rail),7xlbecomes1620px(the widest page measure) — with the eleven slots between them at256 × r^n,r = (1620 / 256)^(1/12) ≈ 1.1662. Every neighbouring pair sits ~+16.6% apart, so one step always means the same relative jump. Ratio between neighbours ranges1.157–1.172.Values round to the 4px grid rather than 8px because
1620is not a multiple of 8 and the anchor defines the grid;4xlis nudged 4px to land on1024, a landmark worth keeping.Tests
Full webkit suite green (83 files / 1692 passing, 6 skipped), eslint +
vue-tscclean,catalog:checkin sync. No unit assertion changes: the unit DOM is unstyled, so container values cannot be observed there by construction — this change is verified in the visual layer.Visual regression
Baselines are regenerated and committed (ubuntu-latest, via the
app-storybook-generate-baselinedispatch).I expected this to be the widest-reaching change in the batch. It is not: 42 of 1,945 baselines moved, none added, none orphaned. Every one is a story wrapper or a trigger sized off the scale:
max-w-sm384 → 408container-xl576 → 644container-xs320 → 348container-md448 → 472Popover,Dropdown,Tooltip,Panel,Dialog,Table.FilterandTable.ColumnSelectorall size their panels from container tokens, so this PR changes their rendered widths. Not one of them moved — because every one of those stories snapshots its trigger closed. The panels are never rendered, so nothing compares them.Concretely: this PR widens the Popover
widthpresets from 320/384/448 to 348/408/472, the change its own doc-text edit describes, and no check anywhere verifies that. The same is true for six other overlay components.That gap is pre-existing — the overlay stories have always shot closed triggers — and closing it means adding open-state stories across seven components, well outside a token retune. I did not widen this PR to do it. Recommend a follow-up; on this branch the honest statement is that the token change is verified where it is verifiable (wrappers and triggers) and unverified in every overlay.
Notes
packages/theme/dist/v4/globals.{css,scss}is regenerated withpnpm --filter @aziontech/theme build:tokens, not hand-edited.feat/theme-placeholder-tokensregenerates the same files; whichever merges second needs a rebase plus a rebuild."384px (container-sm)"), but a drawer is sized against the viewport it covers, not a reading measure — its widths are literals that do not move with the scale, and after the retune the annotation was simply wrong (container-smis now408px). The annotation is dropped; the values are untouched, so drawer widths do not change.