Repository navigation
fix(core): the switch thumb stays round, and inherited text takes the theme's body size - #12236
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
Owner decision (engineering owner, covering this pull request): plain inherited text takes the theme's body size. |
|
/approve-spec d4c1952 |
There was a problem hiding this comment.
Changes requested. The Switch thumb and inherited-text fixes behave as described; one release-note claim and two existing tests need updating before this lands.
- The inherited-text changeset and INV20's last sentence say an app keeps 16px by setting its own
bodyfont-size, but everyThemewrapper now setsfont-size: var(--text-body-size), so withbodyat 16px the text inside a Theme stays 14px: scope that route to text outside a Theme, and name one that works inside it, such as a font-size on the app's own container inside the Theme (raising--text-body-sizealso enlarges Core's own body text, so say that too). - The existing Switch touch test (
packages/core/src/Switch/__tests__/Switch.interaction.browser.spec.ts:991) still expects the thumb's radius to end inpx, so it fails in the WebKit interaction job against the new50%; update it to expect50%. - The canonical setup test (
internal/vibe-tests/setup-test/setup-canonical.test.ts) fails 9 cases intest-buildbecause a host app's own unsized text now shrinks from 16px to 14px once it importsreset.css; update those expectations, and say in the changeset that loadingreset.cssresizes an existing app's own unsized text.
Smaller notes, none blocking, are inline: Theme.spec.md still lists the body text size as untested though this change adds that test, INV20's failure-signal cell names no failure, and the new reset.css comment can be shorter.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claim: the thumb used the pill token, so a theme with square pills drew a square thumb. Verified: the y2k theme's thumbs measure a 0px radius on the base.
- Claim: the radio already draws at 50%. Verified: the Indicator record's FR5 and
RadioIndicator.circle.source-build.test.mjs. - Claim: nothing set a size on
bodyor the Theme wrapper, so inherited text drew at 16px while Core's body text used 14px. Verified: 16px on the base;--text-body-sizeresolves to 14px (tokens.stylex.ts:369,:448). - Claim: the affected text includes plain text in cards and stacks, Blockquote quotes and
Text type="inherit". Verified: the Blockquote quote measures 16px on the base and 14px on the head;Text type="inherit"inherits its size (text.stylex.ts:143). - Claim: the thumb draws at 50% on its square box and the track keeps the pill token. Verified:
Switch.tsx:540and:333; every thumb size is square. - Claim: a theme that wants a square thumb sets the radius on
switch-thumb. Verified: the target exists (Switch.doc.mjs:388) and theme styles sit in a later layer than component styles (reset.css:40). - Claim:
reset.cssgivesbodythe token and each Theme wrapper carries it, so a nested theme's size reaches its text. Verified:reset.css:106,Theme.tsx:86. - Claim: setting it on
body, nothtml, leavesremunchanged. Verified:htmlstays 16px on the head. - Claim: with no token defined,
bodykeeps the browser's size. Verified: the declaration has no fallback, sobodyinherits. - Claim: an app's own
bodyfont-size wins over the reset. Verified forbodyand text outside a Theme; false as a way to size text inside a Theme (first finding). - Claim: the default look changes on purpose, 16px to 14px, and the changeset says how to keep 16px. The first part is verified; the second is false inside a Theme.
- Claim: every page and block template was rendered on both trees, and only inherited-text spots change size. Not reproduced; spot checks agree (the Blockquote changes; the default Card and the default-theme Switch are pixel-identical).
- Claim: other themes and apps were surveyed. Not verifiable from this repository.
- Claim: no new public API. Verified: the API report shows no change for Core or the seven published themes.
- Claim: the three new tests check the 50% thumb beside the token track, the
bodyrule and the wrapper's size. Verified: each fails on the base and passes on the head. - Claim: the Switch, Theme and reset suites and the knowledge check pass. Verified for the unit suites (112 tests) and the knowledge check; false for the Switch touch interaction suite, which fails in CI (second finding).
- Changeset (Switch): the thumb draws at 50%, a theme with square pills keeps a round thumb, and
switch-thumbsets a square one. Verified. - Changeset (inherited text): 14px by default, following
--text-body-size, set onbodyand on each Theme. Verified. Its "set your ownbodyfont-size" route to 16px is false inside a Theme, and it does not mention that an existing app's own text shrinks. - File
.changeset/core-inherited-text-body-size.md: finding (the 16px route; host-app impact). - File
.changeset/core-switch-thumb-circle.md: clear. - File
docs/architecture/theme-compilation.md: finding (INV20's last sentence); note on its failure-signal cell. - File
docs/specs/components/Switch/Switch.spec.md: clear. - File
docs/specs/components/theme/Theme.spec.md: note (body size listed as untested). - File
packages/core/src/Switch/Switch.thumbCircle.source-build.test.mjs: clear. - File
packages/core/src/Switch/Switch.tsx: finding (the existing touch test still expects a px radius). - File
packages/core/src/reset.css: finding (the canonical setup test's host text); note (comment length). - File
packages/core/src/reset.test.ts: clear. - File
packages/core/src/theme/Theme.test.tsx: clear. - File
packages/core/src/theme/Theme.tsx: clear; its wrapper declaration is what the first finding's wording has to describe.
|
/approve-spec 821b45b |
There was a problem hiding this comment.
Changes requested. The Switch thumb and inherited-text fixes work as the changesets and records describe, and the points raised on the previous head are fixed in code; one description fix is needed before this lands.
- The pull request description still says
reset.cssgivesbodythe body size, that an app's ownbodyfont-size wins, that INV20 is set onbody, that plain inherited text is now 14px everywhere and thatreset.test.tsasserts thebodyrule, but at this headreset.csssets no font size (reset.css:98-103, asserted byreset.test.ts:221-232) and only eachThemewrapper does, so please rewrite those lines to the Theme-only route the changeset already states.
Two non-blocking wording notes on the verification rows are inline. CI is still running on this head, so the WebKit Switch touch test and the canonical setup test, which failed on the previous head, still need a green run.
Claims and files checked
Review mode: full; reason: spec-record
- Changeset, inherited text: text inside a Theme with no size of its own takes the theme's body size, 14px by default: verified (
Theme.tsx:86; a span inside the Theme measures 16px on the base and 14px on the head). - Changeset, inherited text: Card and Stack text, a Blockquote's quote and
Text type="inherit"follow the token: verified (none sets its own size;text.stylex.ts:143). - Changeset, inherited text: text outside a Theme and host styles are unchanged, since
reset.csssets no size: verified (reset.css:98-103; a span onbodystays 16px). - Changeset, inherited text: a container's own font-size inside the Theme, or the theme's
--text-body-size, keeps 16px, the second also sizing Core body text: verified (inheritance from the wrapper's declaration; Text body reads the same token). - Changeset, switch thumb: the thumb is drawn at 50% while the track keeps the pill token: verified (
Switch.tsx:540,:333; y2k thumbs 0px to 50%, track 0px). - Changeset, switch thumb: a theme that wants a square thumb sets the radius on
switch-thumb: verified (Switch.doc.mjs:204; theme rules sit in a later layer than component styles). - Description: a theme that squares pills squared the thumb, and the radio already draws at 50%: verified (
y2kTheme.ts:301,RadioListItem.tsx:85). - Description: Core set no size on
bodyor the Theme wrapper, so inherited text stayed at 16px: verified on the base. - Description:
reset.cssgivesbodythe size, onbodynothtml, keeping the browser size with no token, with an app'sbodysize winning over it: false (reset.css:98-103). - Description: INV20 sets it on
bodyand on each Theme: false (theme-compilation.md:272-281). - Description: plain inherited text is now 14px by default: false outside a Theme.
- Description: 88 of 768 templates change only at inherited-text spots; other apps move because they load
reset.css: not reproduced, and the second rests on the removed rule. - Description: Scope lists
reset.css: false (not changed). - Description: no new public API: verified (0 API rows for Core and the seven themes).
- Description, testing: the thumb source-build test and the Theme wrapper test: verified (each fails on the base and passes on the head).
- Description, testing:
reset.test.tsasserts thebodyrule: false (it asserts no font size onhtmlorbody). - Description, testing: the Switch, Theme and reset suites, the knowledge check and Prettier pass: verified for the unit suites, the knowledge check and Prettier; the browser suites have not run on this head.
- Files:
.changeset/core-inherited-text-body-size.mdclear;.changeset/core-switch-thumb-circle.mdclear;docs/architecture/theme-compilation.mdnon-blocking note (INV20 verification row);docs/specs/components/Switch/Switch.spec.mdclear;docs/specs/components/theme/Theme.spec.mdnon-blocking note (FR1 verification row);Switch.thumbCircle.source-build.test.mjsclear;Switch.tsxclear;Switch.interaction.browser.spec.tsclear;reset.test.tsclear;Theme.test.tsxclear;Theme.tsxclear.
| | INV18 | `colorModeBlocks.test.ts` output tests, `build-theme.color-mode-blocks.test.mjs` (CLI-built CSS), and `colorModeBlocks.a11y.chromium.spec.ts` (the ColorModeBlocks story: the Theme's mode, system preference, a mode that is neither, nested Theme, media surfaces one and more deep, explicit Text and Heading props alike at the root and on a surface, a press, Pagination's current page and a text field's status border kept in the other mode) | A mode block applies in the other mode, overrides a base-layer rule there, or changes CSS for a theme without blocks | | ||
| | INV19 | `generateThemeRules.test.ts` (the scope-root font rule), `reset.test.ts` (the `html` rule, none on `body`), and `reset.font.a11y.chromium.spec.ts` (a label measured in a span in `body` has its drawn width in the theme root; a page with no token keeps its font) | Text measured or drawn in `body` uses a different font from the token at the page root, or a page with no token changes font | | ||
| | INV19 | `generateThemeRules.test.ts` (the scope-root font rule), `reset.test.ts` (the `html` font rule, no font on `body`), and `reset.font.a11y.chromium.spec.ts` (a label measured in a span in `body` has its drawn width in the theme root; a page with no token keeps its font) | Text measured or drawn in `body` uses a different font from the token at the page root, or a page with no token changes font | | ||
| | INV20 | `Theme.test.tsx` (the wrapper's body size) and `reset.test.ts` (no font size on `html` or `body`) | Text inside a Theme with no size of its own | |
There was a problem hiding this comment.
Non-blocking: the failure column names a state, not a failure. Suggested:
Text inside a Theme with no size of its own draws at another size than its theme's body size, or the reset sets a font size on
htmlorbody.
|
/approve-spec 21e9bff |
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| Switch · Storybook | 109.4 kB (+5 B) · 10.0 kB CSS (+10 B) | 1,733 (0) | — · — · — |
Package size: @astryxdesign/core 7.65 MB packed (+157 B); no new dependencies.
Wide change (shared styles: packages/core/src/theme/Theme.tsx): add ci:run-visual for Visual, ci:run-a11y for Accessibility, ci:run-rtl for RTL.
Current run: CI concluded failure; parts of this report may be missing.
Generated by PR Enrichment workflow | View full report
There was a problem hiding this comment.
Approved pending CI. The Switch thumb now stays round under a theme that squares its pills, and unsized text inside a Theme takes the theme's body size; the changesets, records, tests and the rewritten description all match the code. CI has not run on this head yet: its run was cancelled because CI had no room, so this approval waits for a re-run of the CI workflow and its required checks to pass.
Two non-blocking wording notes on the INV20 and Theme FR1 verification rows are still open inline.
Claims and files checked
Review mode: incremental; reason: none
- Changeset, inherited text: text inside a Theme with no size of its own takes the theme's body size, 14px by default instead of 16px: verified (
Theme.tsx:86; a span inside the Theme measures 16px on the base and 14px on the head). - Changeset, inherited text: plain text in a Card or Stack, a Blockquote quote and
Text type="inherit"follow the token and move with a theme's text size: verified (none sets its own size;text.stylex.ts:142-144; the Blockquote quote goes from 16px to 14px). - Changeset, inherited text: text outside a Theme and a host's own styles are unchanged, since
reset.csssets no size: verified (reset.css:86-103; a span onbodystays 16px). - Changeset, inherited text: a font-size on your own container inside the Theme, or the theme's
--text-body-size, keeps 16px, the second also sizing Core body text: verified (inheritance below the wrapper;text.stylex.ts:110). - Changeset, switch thumb: the thumb is drawn at 50% while the track keeps the pill token: verified (
Switch.tsx:540,:333; y2k thumbs go from 0px to 50%, the track stays 0px). - Changeset, switch thumb: a theme that wants a square thumb sets the radius on
switch-thumb: verified (Switch.doc.mjs:204; theme rules sit in a later layer,reset.css:40). - Description: a theme that squares pills squared the thumb, and the radio already draws at 50%: verified (
y2kTheme.ts:301,RadioListItem.tsx:85). - Description: the Theme wrapper set no size, so inherited text in Card, Stack, Carousel, Blockquote, ChatTokenizedText and
Text type="inherit"stayed at 16px while Core body text used 14px: verified on the base. - Description: each Theme wrapper carries its body size, a nested Theme's included,
reset.csssets none, and line height is unchanged: verified (Theme.tsx:86;reset.css:88keepsline-height: 1.5, so lines shorten with the text). - Description: Switch FR16, Theme FR1 and INV20 state this behavior: verified (
Switch.spec.md:173,Theme.spec.md:86,theme-compilation.md:272). - Description: the default look changes on purpose, with the same two escapes the changeset gives: verified.
- Description: the template render sweep (80 of 770 change, all at inherited text) and the check of another theme and two apps: not reproduced; consistent with the two style changes being the only rendering changes.
- Description: scope Switch and Theme, no new public API, no internal context in public text: verified (0 API rows for Core and the seven themes).
- Description, testing: the thumb source-build test, the browser radius check, the Theme wrapper test and the reset guard: verified (the thumb and Theme tests fail on the base and pass on the head; the reset case passes on both).
- Description, testing: the Switch, Theme and reset suites, the knowledge check, Prettier and the changeset check pass: verified; the core typecheck was not rerun here.
- Description: the writing self-check of the new record rows (no narration, no change references, tests named): verified.
- Files:
.changeset/core-inherited-text-body-size.mdclear;.changeset/core-switch-thumb-circle.mdclear;docs/architecture/theme-compilation.mdnon-blocking note (INV20 verification row);docs/specs/components/Switch/Switch.spec.mdclear;docs/specs/components/theme/Theme.spec.mdnon-blocking note (FR1 verification row);Switch.thumbCircle.source-build.test.mjsclear;Switch.tsxclear;Switch.interaction.browser.spec.tsclear;reset.test.tsclear;Theme.test.tsxclear;Theme.tsxclear.
… theme's body size
21e9bff to
b6893a2
Compare
|
/approve-spec b6893a2 |
There was a problem hiding this comment.
Changes requested. The Switch thumb now stays round under a theme that squares its pills, and text inside a Theme that sets no size of its own now takes the theme's body size; both fixes, their tests and the changesets check out at this head. One record row needs restoring before approval:
docs/specs/components/theme/Theme.spec.md:135: the rebase replaced thecomponent:ThemeFR1 verification row with the FR1 requirement text (three cells under a five-column header), so FR1 cites no test, failure expectation or audit section and the description's writing-rubric result for that row no longer holds; restore the row and cite the new body-size test, as the inline suggestion shows.
CI's heavy checks have not run on this head because the run was cancelled while CI was full, so they still need to pass after the fix. A few non-blocking wording suggestions are inline.
Claims and files checked
Review mode: full; reason: rebase
- Claim: a theme that squares its pills squared the switch thumb on the base — verified (base
Switch.tsx:537, the y2k theme's pill radius is 0px, base probe 0px). - Claim: the thumb is now drawn at 50% and the track keeps the pill token — verified (
Switch.tsx:540,Switch.tsx:333; the new source-build test fails on the base and passes here; y2k probe 0px to 50%). - Claim: a theme can still square the thumb through the
switch-thumbtarget — verified (Switch.doc.mjs:204; theme target rules sit in a layer above Core's styles). - Claim: the radio already draws its circle at 50% — verified (
Indicator/RadioIndicator.tsx:35). - Claim: the Theme wrapper set no font size, so unsized text stayed at 16px beside 14px body text — verified (base
Theme.tsx; the new Theme test fails on the base). - Claim: each Theme wrapper now declares the body size, a nested theme's included — verified (
Theme.tsx:87; theme variables are scoped to the wrapper itself). - Claim: plain text in Card, Stack and Carousel, a Blockquote quote, ChatTokenizedText text and
Text type="inherit"follow it — verified (none sets a font size; Blockquote probe 16px to 14px). - Claim: the reset sets no font size, so text outside a Theme keeps its size — verified (
reset.css:86-103,reset.test.ts:221, probehtmlandbodystay 16px). - Claim: line height is unchanged — true for declarations; computed line height scales with the text (24px to 21px).
- Claim: 16px stays reachable through a container font size or the theme's body size token — verified (CSS inheritance).
- Claim: the default look moves from 16px to 14px — verified (the token is 0.875rem; probes).
- Claim: before/after renders of every template show only inherited text changing — not reproduced here; the probes agree.
- Claim: other themes and apps were checked — not verifiable in this review.
- Claim: no new public API — verified (API generator: 0 rows across Core, build, richtext and the seven themes).
- Claim: public text carries no internal context — verified.
- Claim: the new tests and the Switch, Theme and reset suites pass, as do the knowledge, Prettier and changeset checks — verified (114 tests; each check exits 0); the browser spec's 50% expectation was read, not run.
- Claim: the writing rubric covered the Theme FR1 verification row, and verification cells name tests — false (
Theme.spec.md:135). - File:
.changeset/core-inherited-text-body-size.md— clear. - File:
.changeset/core-switch-thumb-circle.md— clear. - File:
docs/architecture/theme-compilation.md— non-blocking (INV20 failure cell wording). - File:
docs/specs/components/Switch/Switch.spec.md— clear. - File:
docs/specs/components/theme/Theme.spec.md— blocking (FR1 verification row). - File:
packages/core/src/Switch/Switch.thumbCircle.source-build.test.mjs— clear. - File:
packages/core/src/Switch/Switch.tsx— clear (non-blocking comment wording). - File:
packages/core/src/Switch/__tests__/Switch.interaction.browser.spec.ts— clear. - File:
packages/core/src/reset.test.ts— clear. - File:
packages/core/src/theme/Theme.test.tsx— clear. - File:
packages/core/src/theme/Theme.tsx— clear.
| alignItems: 'center', | ||
| justifyContent: 'center', | ||
| borderRadius: radiusVars['--radius-full'], | ||
| // A circle marks the thumb; it is no corner. 50% draws it on the square |
There was a problem hiding this comment.
Non-blocking (INV29): "it is no corner" is vague. Suggested:
// The thumb is a circle on its square box. A theme that squares
// --radius-full squares the track and keeps the thumb round.|
/approve-spec c326dc4 |
There was a problem hiding this comment.
Approved pending CI. CI is still running on this head, so its remaining unit, interaction and build checks still need to pass. The Switch thumb now stays round under a theme that squares its pills, text inside a Theme that sets no size of its own takes the theme's body size, and the restored Theme record FR1 verification row clears the last blocker.
Non-blocking: the FR1 row's failure cell still names only the theme attribute (inline suggestion), and the two earlier wording suggestions on the INV20 verification row and the Switch thumb comment are still open.
Claims and files checked
Review mode: full; reason: spec-record
- Claim (changeset): text inside a Theme that sets no size now uses the theme's body size, 14px by default instead of 16px — verified (
Theme.tsx:87; the new Theme test fails on the base and passes here; Blockquote probe 16px to 14px). - Claim (changeset): plain text in Card and Stack, a Blockquote quote and
Text type="inherit"follow the body size token and move with the theme — verified (Card and Stack set no font size;Blockquote.tsxsizes only the citation;text.stylex.ts:143). - Claim (changeset): text outside a Theme and a host's own styles are unchanged because the reset sets no font size — verified (
reset.css:86-103,reset.test.ts:221; probe:htmlandbodystay 16px). - Claim (changeset): 16px stays reachable through a font size on your own container inside the Theme, or the theme's body size token, which also sizes Core's body text — verified (CSS inheritance;
text.stylex.ts:110). - Claim (changeset): the thumb is drawn at 50% instead of the pill token, so a squared-pill theme squares the track and keeps a round thumb — verified (
Switch.tsx:540,Switch.tsx:333; y2k probe thumbs 0px to 50%, track 0px). - Claim (changeset): a theme that wants a square thumb sets the radius on
switch-thumb— verified (Switch.tsx:1055; theme target rules load in a layer above Core's styles,Theme.tsx:152). - Claim: the pill token squared the thumb under a squared-pill theme — verified (base
Switch.tsx:537; base y2k probe 0px). - Claim: the radio already draws its circle at 50% — verified (
Indicator/RadioIndicator.tsx:35). - Claim: the Theme wrapper set no font size, so unsized text stayed at 16px beside 14px body text — verified (base
Theme.tsx; red-first Theme test). - Claim: Card, Stack and Carousel text, a Blockquote quote, ChatTokenizedText text and
Text type="inherit"are covered — verified (none sets a font size for that text). - Claim: each wrapper carries its own theme's size, a nested theme's included — verified (
Theme.tsx:87; theme variables live on the wrapper itself). - Claim: line height is unchanged — true for the declaration (
reset.css:88); computed line height scales with the text (24px to 21px). - Claim: the default look moves from 16px to 14px inside a Theme, and the changeset says how to keep 16px — verified (token
0.875rem; probes; changeset text). - Claim: before/after renders of every template show only inherited text changing — not reproduced; the probes agree.
- Claim: another theme and two apps were checked — not verifiable in this review.
- Claim: no new public API — verified (API surface comparison: 0 rows across Core and the seven themes).
- Claim: public text carries no internal context — verified.
- Claim: the new source-build test checks a 50% thumb and a pill-token track — verified (fails on the base, passes here).
- Claim: the browser interaction spec now expects 50% — verified (the Switch touch spec passes in Chromium, 47 tests).
- Claim: the Theme test checks the wrapper's body size and the reset test checks no font size on
htmlorbody— verified (the Theme case fails on the base; the reset case is a guard). - Claim: the Switch, Theme and reset suites, the knowledge check, Prettier and the changeset check pass — verified (138 tests; each check passes).
- Claim: the writing rubric covered the new Switch row, the Theme FR1 row and INV20, and verification cells name tests — verified (
Switch.spec.md:336,Theme.spec.md:135,theme-compilation.md:410). - File:
.changeset/core-inherited-text-body-size.md— clear. - File:
.changeset/core-switch-thumb-circle.md— clear. - File:
docs/architecture/theme-compilation.md— non-blocking (INV20 failure cell wording). - File:
docs/specs/components/Switch/Switch.spec.md— clear. - File:
docs/specs/components/theme/Theme.spec.md— non-blocking (FR1 failure cell); the earlier blocker is fixed. - File:
packages/core/src/Switch/Switch.thumbCircle.source-build.test.mjs— clear. - File:
packages/core/src/Switch/Switch.tsx— clear (non-blocking comment wording). - File:
packages/core/src/Switch/__tests__/Switch.interaction.browser.spec.ts— clear. - File:
packages/core/src/reset.test.ts— clear. - File:
packages/core/src/theme/Theme.test.tsx— clear. - File:
packages/core/src/theme/Theme.tsx— clear.
| | FR2 | `ThemeColorScheme.a11y.chromium.spec.ts` with the `Core/Themes/ColorScheme` story | system root under a host's dark root; reader light; reader dark with `reset.css`, and without it on a root that names no scheme; system under forced light; system under system | A system Theme that declares its own scheme under a host's dark root, a root that stops following the reader with `reset.css`, a root without `reset.css` that turns dark for a dark reader, or a system Theme under forced light that stays light for a dark reader, fails. | `audit:Theme/behavior` | | ||
| | Contract | Verification | Representative states | Mutation or failure expectation | Audit section | | ||
| | -------- | ---------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- | | ||
| | FR1 | `Theme.test.tsx` "sets data-astryx-theme on wrapper div" and "gives text inside that only inherits its size the theme's body size" | any theme | A missing theme attribute fails. | `audit:Theme/behavior` | |
There was a problem hiding this comment.
Non-blocking: this row now cites the body-size case, but its failure cell still names only the theme attribute, so the record understates what the row guards. Suggested:
A missing theme attribute or body size fails.
User impact
Two theme settings didn't reach parts that users see:
--radius-fullpill token, so a theme that squares its pills turned every switch's round thumb into a square. The radio had the same defect, already fixed by drawing it at 50%.Themewrapper set no font size. Text inside a Theme that sets no size of its own stayed at the browser's 16px whatever the theme's text size was, while Core's own body text used the theme's 14px. That covers plain text in a Card, Stack or Carousel, a Blockquote's quote, ChatTokenizedText's text, andText type="inherit".Problem and solution fit
switch-thumb.Themewrapper carriesfont-size: var(--text-body-size)for its own theme, so text inside it that sets no size follows the theme, a nested theme's size included.reset.csssets no font size, so installing Astryx leaves a host app's own text outside a Theme as it was.Expected behavior and authority
component:SwitchFR16: the thumb is a circle at 50% in every state and size.component:ThemeFR1: the wrapper carries the body text size.architecture:theme-compilationINV20: text inside a Theme that only inherits its size takes the body size token. The reset sets none, so a host's own text keeps its size.Default look
This changes the default look on purpose: text inside a Theme that sets no size of its own is now 14px by default instead of 16px. To keep 16px inside a Theme, set a font-size on your own container inside it, or set
--text-body-sizein your theme, which also sizes Core's own body text. The changeset says the same.Before/after pictures: every page and block template was rendered inside
<Theme theme={neutralTheme}>with main and with this change at 1280px. 770 rendered on both trees; 5 failed to render on one side.Other themes and apps: I checked an internal theme and two internal apps. The theme sets its body size to 14px. Both apps wrap their pages in a Theme and set no font-size on their own containers, so their inherited text inside the Theme moves from 16px to 14px. Their own text outside it is unchanged.
Scope
Components: Switch, Theme
Testing
Switch.thumbCircle.source-build.test.mjs: the compiled thumb radius is 50% and the track keeps--radius-full.Switch.interaction.browser.spec.ts: the thumb's radius reads50%.Theme.test.tsx: the wrapper declares the body size.reset.test.ts: no font size onhtmlorbody.pnpm check:knowledge, coretsc, Prettier and the changeset check pass.Writing rubric results
Run over the
component:SwitchFR16 row and its verification row, thecomponent:ThemeFR1 edit and its verification row, andarchitecture:theme-compilationINV20 and its verification row.R1 narration: none; each sentence states what Core draws or declares.
R2 research: none.
R3 evidence: verification cells name tests.
R4 rejected alternatives: none recorded.
R5 change references: none.
R6 open questions: none touched.
R7 project status: none.