Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
42ef276 to
aad645c
Compare
|
Real Safari check (iOS simulators, Safari 18.6 and Safari 26.2): input, button, select and textarea under a |
PR Analysis Report📚 Storybook Preview🧪 Sandbox PreviewNo new or modified components detected. Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Visual Regression46 of 494 shot(s) changed. A change here is a question, not a failure: check whether the after is the
and 26 more. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
There was a problem hiding this comment.
Thanks — the change works: under the reset, native form controls now pick up their container's letter-spacing, and a control that sets its own spacing keeps it. Approval needs a maintainer decision, because no current spec governs what reset.css declares (AST-080 covers only its cascade layer): a maintainer needs to approve or reject making form controls inherit letter-spacing and provide or identify the spec that governs the reset's form-control typography. Separately, unless that spec sets a different compatibility rule for the reset, please re-tag the Changeset as a patch [feat] (or [fix] if the spec is recorded first): AST-017 FR3 and FR54 treat an appearance-only change to the reset as nonbreaking, and the [breaking] tag is what fails check:changesets. When you rebase, recompute the Pages manifest hash for reset.css, because main has changed the reset since this branch was cut.
[Automated review]
| '@astryxdesign/core': minor | ||
| --- | ||
|
|
||
| [breaking] Under `reset.css`, form controls (`button`, `input`, `optgroup`, `select`, `textarea`) now inherit `letter-spacing` from their parent, as they already inherit its font and color. The browser's stylesheet sets `letter-spacing: normal` on them, and `letter-spacing` is not part of `font`, so text in a control ignored any tracking set on its container. A page with letter-spacing on a container of native controls now sees it in those controls too. |
There was a problem hiding this comment.
AST-017 classifies a typography-only change like this one as nonbreaking. FR3 says it "uses [fix] when it restores current visual authority and [feat] when it intentionally changes visual direction". FR32's [breaking] path needs pre-existing current authority, which the PR description says doesn't exist for reset.css. Once a maintainer settles the reset's control typography, a patch bump with the FR3 tag lets check:changesets pass on 0.7.1. The old/new spacing and the letter-spacing: normal escape can stay as written.
There was a problem hiding this comment.
Done in c4a8bd6: the changeset is now a patch [feat] under FR3, since no current record governs the reset's form-control typography; recorded authority would make it [fix]. The old and new spacing stay as written, and the escape is now an exact rule, button, input, optgroup, select, textarea { letter-spacing: normal; }, which computes normal again in Chromium 149. Rebased on main with the Pages copy and hash regenerated; check:changesets passes. The description follows the visual-update template, with before and after screenshots.
aad645c to
c4a8bd6
Compare
There was a problem hiding this comment.
Thanks — the change works: under the reset, native form controls now take their container's letter-spacing, a control with its own spacing keeps it, and the patch [feat] Changeset and the Pages hash are in order. Approval needs a maintainer decision, because no current spec governs what reset.css declares (AST-080 covers only its layer and loading): a maintainer needs to approve or reject making form controls inherit letter-spacing and provide or identify the spec that governs the reset's form-control typography. Separately, please scope the Changeset's opt-out to the reset layer, for example @layer reset { button, input, optgroup, select, textarea { letter-spacing: normal; } }, because as ordinary unlayered CSS it also overrides letter-spacing a theme sets on the control itself, such as the theme template's destructive small Button, which the old reset left alone.
[Automated review]
|
|
||
| [feat] Under `reset.css`, form controls (`button`, `input`, `optgroup`, `select`, `textarea`) now inherit `letter-spacing` from their parent, as they already inherit its font and color. The browser's stylesheet sets `letter-spacing: normal` on them, and `letter-spacing` is not part of `font`, so a control's text kept the default spacing inside tracked text. Controls inside a container with letter-spacing now show that tracking. Astryx's components look the same: none sets letter-spacing on a container of native controls. | ||
|
|
||
| To keep the old spacing, add `button, input, optgroup, select, textarea { letter-spacing: normal; }`. |
There was a problem hiding this comment.
As ordinary (unlayered) CSS, this rule also overrides letter-spacing that a theme sets on the control itself, for example the theme template's variant:destructive+size:sm Button (0.02em), which the old reset left alone, so it doesn't fully keep the old look. Scoping it to the reset layer restores the old values for both themed and unthemed controls:
@layer reset {
button, input, optgroup, select, textarea { letter-spacing: normal; }
}There was a problem hiding this comment.
Done in 6d7621a. The escape is now @layer reset { button, input, optgroup, select, textarea { letter-spacing: normal; } }. In Chromium 149, with it added, plain controls under a tracked parent compute normal, and a control whose letter-spacing comes from the astryx-theme layer keeps its 0.02em, both as on main; the unlayered version reset that control to normal. The description says the same.
There was a problem hiding this comment.
Thanks — the change works: native form controls now take their container's letter-spacing, and the layered opt-out keeps a theme's spacing on a control. Approval needs a maintainer decision, because no current spec governs what reset.css declares (AST-080 covers only its layer and loading): a maintainer needs to approve or reject making form controls inherit letter-spacing, say whether select and optgroup are included, and provide or identify the spec that governs the reset's form-control typography. If it goes ahead, two fixes are needed:
- In Firefox 151 a content-sized native
selectunder a tracked container keeps its width while its label gains the tracking, so the label is clipped ("All statuses" shows as "All status"); leavingselectout of the new declaration avoids this, unless a maintainer decides selects should track anyway. - Chromium and Firefox leave
optgroupto inherit from itsselect, so the Changeset's opt-out should drop it,@layer reset { button, input, select, textarea { letter-spacing: normal; } }, because as written it strips a select's own tracking from its group labels and options, which the old reset never did.
[Automated review]
| */ | ||
| :where(button, input, optgroup, select, textarea) { | ||
| font: inherit; | ||
| letter-spacing: inherit; |
There was a problem hiding this comment.
In Firefox 151 this makes a content-sized native select under tracked text clip its label: an unstyled select under a 0.15em container keeps its 110.3px width while its tracked label alone needs 121.1px, so "All statuses" shows as "All status". Chromium 149 widens the same select from 106 to 135px. Leaving select out of this declaration, for example with a separate :where(button, input, textarea) { letter-spacing: inherit; }, keeps selects as they are today, unless a maintainer decides selects should track anyway.
There was a problem hiding this comment.
Done in 2535bec: select is out. The declaration is now its own rule, :where(button, input, textarea) { letter-spacing: inherit; }, and the form rule is back to main's. I reproduced the clipping in Firefox 151 first: under a 0.15em container an unstyled select stayed 92.1px wide while its tracked label needed 102.9px, and it showed "All statu". On this head it renders as on main, in Chromium 149 too. Date, time, number and file inputs widen for the tracking in both engines without clipping. The comment above the rule and the changeset say why a select keeps the browser's spacing, and the browser spec now checks that a select, its option and a listbox's optgroup compute normal.
|
|
||
| [feat] Under `reset.css`, form controls (`button`, `input`, `optgroup`, `select`, `textarea`) now inherit `letter-spacing` from their parent, as they already inherit its font and color. The browser's stylesheet sets `letter-spacing: normal` on them, and `letter-spacing` is not part of `font`, so a control's text kept the default spacing inside tracked text. Controls inside a container with letter-spacing now show that tracking. Astryx's components look the same: none sets letter-spacing on a container of native controls. | ||
|
|
||
| To keep the old spacing, add `@layer reset { button, input, optgroup, select, textarea { letter-spacing: normal; } }`. In the `reset` layer, it still yields to spacing a theme or your own styles set on a control. |
There was a problem hiding this comment.
Chromium and Firefox leave optgroup to inherit from its select, so listing it here strips a select's own tracking from its group labels and options: in a listbox whose own CSS tracks it 0.2em at 16px, they compute 3.2px with the old reset and normal with this opt-out. @layer reset { button, input, select, textarea { letter-spacing: normal; } } matches the old reset in every case checked in Chromium 149 and Firefox 151. The same applies to "The browser's stylesheet sets letter-spacing: normal on them" on line 5, which holds for four of the five elements.
There was a problem hiding this comment.
Done in 2535bec. With select out of the rule, the opt-out lists exactly what the rule changes, @layer reset { button, input, textarea { letter-spacing: normal; } }, and line 5 now names only button, input and textarea, the elements the browser does set to normal. In Chromium 149 and Firefox 151 it computes as on main for plain controls under a tracked parent, for a control whose spacing comes from the astryx-theme layer, and for a listbox select that tracks itself at 0.2em: its optgroup and option keep 3.2px. With the old opt-out they computed normal, as you found.
6d7621a to
2535bec
Compare
There was a problem hiding this comment.
Thanks — both earlier fixes are in: select now keeps the browser's spacing, so Firefox no longer clips a tracked select, and the Changeset's opt-out restores the old look exactly, including a theme's or a listbox's own tracking. Approval now waits on a maintainer decision, because no current spec governs what reset.css declares (AST-080 covers only its layer and loading): a maintainer needs to approve or reject making button, input and textarea inherit letter-spacing, and provide or identify the spec that states it. Nothing else needs to change on your side.
[Automated review]
2535bec to
a026812
Compare
There was a problem hiding this comment.
Thanks — the rebase keeps both earlier fixes, and the change works as described: under the reset, button, input and textarea now take their container's letter-spacing, select keeps the browser's spacing, and the Changeset's opt-out restores the old rendering exactly in Chromium and Firefox. Approval still waits on a maintainer decision, because no current spec governs what reset.css declares (AST-080 covers only its layer and loading): a maintainer needs to approve or reject making these three controls inherit letter-spacing, and provide or identify the spec that states it. Separately, the failing pr-a11y check runs a test that main added after this branch's base, so rebasing onto main should clear it; nothing else needs to change on your side.
[Automated review]
…ir font The reset's form-element rule inherits `font` and `color`, but the browser's stylesheet also sets `letter-spacing: normal` on button, input, optgroup, select and textarea, and letter-spacing is not part of `font`, so a control's text ignored the tracking around it. The rule now also declares `letter-spacing: inherit`, as Tailwind Preflight does. No Astryx component sets letter-spacing on a container of native controls. The change alters only typography, so the changeset is a patch [feat] (spec:AST-017 FR3, DEC-17) that names the old and new spacing and the escape. No current record governs what reset.css declares. The GitHub Pages landing serves a byte-identical copy of the file, which its test requires to match, so the copy and its manifest hash move with it.
The opt-out sits in the reset layer, so it still yields to the styles a product or theme layers above the reset, and it now restores every old computed value checked in Chromium 149 (CodeBunny).
In Firefox 151 a content-sized select does not widen for letter-spacing: under a 0.15em container an unstyled select stayed 92px wide while its tracked label needed 103px, so "All statuses" showed as "All statu". Chromium widens it. A select therefore keeps the browser's spacing: the declaration moves to its own rule, `:where(button, input, textarea)`, and the form rule is back to main's. optgroup has no browser rule of its own (it inherits from its select), so the changeset's opt-out lists only the three elements the rule changes; it matches the old reset in every case checked in Chromium 149 and Firefox 151 (CodeBunny). The GitHub Pages copy of reset.css and its manifest hash move with it.
a026812 to
19bafab
Compare
There was a problem hiding this comment.
Thanks — on this rebased head the change does what it describes: under the reset, button, input and textarea take their container's letter-spacing in Chromium and Firefox, select keeps the browser's spacing, CI is green, and the Changeset's opt-out brings back the old rendering exactly. It can't be approved yet only because no current spec decides what reset.css declares (AST-080 covers where its rules live and how it loads), so a maintainer needs to approve or reject inheriting letter-spacing for these three controls and provide or identify the spec that records that decision. Nothing else needs to change on your side.
[Automated review]
|
From a design standpoint, I'd expect these controls to match their intended text styles rather than inherit from wherever they're placed:
TextInput and TextArea already take their family, size and line height from the body tokens ( Could you clarify why you want these controls to inherit letter-spacing? Is there a case where a control should follow its container's tracking instead of its own text style? Alternative: make letter-spacing part of each text style instead of inheriting it.
Input text then matches body text by definition, a theme that changes body tracking updates both in one place, and controls keep the same spacing wherever they're used. |
|
Thanks, that's convincing. I'm closing this PR and leaving the reset as it is. Why I wanted it: parity with Tailwind Preflight, which inherits The one control I found that should follow its container has no text style of its own: Link. It inherits family, size, weight and line height so it reads as part of the sentence, but as a Your tracking-token alternative adds to the type scale, a theme contract, so it would start as a record for that contract's owner rather than in this PR. |
User impact
@astryxdesign/core/reset.cssmakes form controls inherit their parent's font and color, but the browser setsletter-spacing: normalon them andletter-spacingis not part offont. Inside tracked text, such as an uppercase toolbar, a control's text keeps the default spacing. With this change buttons, inputs and textareas take the tracking around them; a control with its own letter-spacing keeps it. Aselectkeeps the browser's spacing: Firefox does not widen a select for letter-spacing, so a tracked label would be clipped. No Astryx component tracks a container of native controls.Visual authority
DDrow reused or amended.Design decisionstable by a team design owner.docs/design/.None applies yet: no current record governs what
reset.cssdeclares (spec:AST-080governs only its layer). The owner decision: whether the reset's control typography includesletter-spacing, as Tailwind Preflight's does, and whether selects should track despite Firefox. Until then the changeset is apatch[feat](spec:AST-017FR3, DEC-17); recorded authority would make it[fix]. Escape:@layer reset { button, input, textarea { letter-spacing: normal; } }.Before and after
Chromium 149, a toolbar tracked
0.2em, onmainand on this branch.mainState matrix
letter-spacingstill wins.normal. Tracked, a Firefox 151 select stays 92px wide while its label needs 103px ("All statu").mainin both engines for plain controls, a themed control, and a self-tracked listbox.Scope
Testing
pnpm exec playwright test packages/core/src/reset.letter-spacing.a11y.browser.spec.ts --project=chromium: 3 passed; the inherit test fails withmain'sreset.css. CI runs Chromium only; Firefox 151 was checked locally with Playwright.pnpm exec playwright test packages/core/src/reset.a11y.chromium.spec.ts --project=chromium: 6 passed.pnpm vitest run packages/core/src/reset.letter-spacing.test.ts packages/core/src/reset.test.ts packages/core/src/reset.until-found.test.ts .github/scripts/pages-landing.test.mjs: 19 passed; the inherit guard fails onmain.pnpm check:repo,check:changesetsincluded) andpnpm -F @astryxdesign/core typecheckpass.