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
{{ message }}
Repository navigation
Commit a2d7f42
Browse filesBrowse the repository at this point in the historyBrowse files
fix(core): reducedMotion takes only 'system' until components follow 'always'
A theme's reducedMotion: 'always' reached only its motion-keyed adaptation
rules and the press release fade; components' own Reduce Motion styles,
Spinner and Skeleton among them, did not follow it. A theme that set it got
a promise most of the page did not keep. The public type now offers only
'system', the default, and the root mark, its custom property, the marked
adaptation blocks and the press release's mark arm go with it. The docs,
template, changeset and the authoring contract's unshipped note say so.
Copy file name to clipboardExpand all lines: .changeset/theme-motion-knobs.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,6 @@
3
3
'@astryxdesign/cli': patch
4
4
---
5
5
6
-
[feat] A theme's `motion` takes three knobs beside the duration scale: `tempo` (0.75–1.5) scales every motion duration, `character` (`'crisp'`, `'standard'` or `'expressive'`) sets the new `--ease-entrance` and `--ease-move` tokens, and `reducedMotion: 'always'` reduces motion for everyone; so far the theme's motion-keyed adaptation rules and the press release fade follow it, not yet components' other Reduce Motion styles. A theme without them renders exactly as before; a duration scale and explicit tokens win over the knobs, Spinner's and Skeleton's loops keep their timing under every tempo, and the press release fade follows tempo up to the 200 ms Reduce Motion cap, under the person's setting or the theme's `'always'`. Springs don't read the knobs yet. The motion, token and theme-authoring docs and the theme template describe the knobs.
6
+
[feat] A theme's `motion` takes three knobs beside the duration scale: `tempo` (0.75–1.5) scales every motion duration, `character` (`'crisp'`, `'standard'` or `'expressive'`) sets the new `--ease-entrance` and `--ease-move` tokens, and `reducedMotion: 'system'`, the only value, follows each person's Reduce Motion setting. A theme without them renders exactly as before; a duration scale and explicit tokens win over the knobs, Spinner's and Skeleton's loops keep their timing under every tempo, and the press release fade follows tempo up to the 200 ms Reduce Motion cap under the person's setting. Springs don't read the knobs yet. The motion, token and theme-authoring docs and the theme template describe the knobs.
['motion','Every --duration-* token, --ease-entrance and --ease-move (springs don\'t read them yet)','tempo? (0.75–1.5), character? (crisp|standard|expressive), reducedMotion? (system|always); and/or a duration scale: fast (ms), medium (ms), ratio, slow?, easing?. The scale wins over tempo for the durations it sets. See {@link generic:motion}.'],
44
+
['motion','Every --duration-* token, --ease-entrance and --ease-move (springs don\'t read them yet)','tempo? (0.75–1.5), character? (crisp|standard|expressive), reducedMotion? (system); and/or a duration scale: fast (ms), medium (ms), ratio, slow?, easing?. The scale wins over tempo for the durations it sets. See {@link generic:motion}.'],
45
45
]},
46
46
{type: 'prose',text: 'For dark mode tuples in token values, see the Dark mode section of {@link generic:use-a-theme}.'},
47
47
],
@@ -106,7 +106,7 @@ export const docs = {
106
106
{type: 'prose',text: "Precedence follows rule order. Root theme values apply first, then every matching rule in declaration order. A later rule may deliberately restore a root value. `onDark` and `onLight` media-surface overrides apply after adaptations and win on the same leaf."},
107
107
{type: 'prose',text: "`extends` preserves the base rule order and appends child rules. Inherited conditions use the child's effective breakpoint map. An empty child rule is a no-op, not a removal operator."},
108
108
{type: 'prose',text: "A rule may replace a theme-local token only when the exact name is already enrolled by root `localTokens` or an enrolled base. Component writes in a rule are validated exactly like root `components`: same targets, axes, and value domains. The one addition is that a rule may not be the only place a custom value is enrolled: a value that is valid only because a theme enrolls it generates unconditional type augmentation, so declare it on the root theme first and let rules restyle it. Built-in values need no root declaration. When rules can match together, their ordered portable and local token writes are validated as one effective graph; any reachable cycle fails before CSS is emitted."},
109
-
{type: 'prose',text: "Adaptations compile to CSS media queries with no resize listener or styling rerender. Runtime and `{@command theme build}` use the same compiler, but only a built theme is present at first paint in an SSR app. Under `reducedMotion: 'always'`, the theme's own or an enclosing theme's, a `motion: 'reduce'` rule applies whatever the person's setting, and a `motion: 'no-preference'` rule does not."},
109
+
{type: 'prose',text: "Adaptations compile to CSS media queries with no resize listener or styling rerender. Runtime and `{@command theme build}` use the same compiler, but only a built theme is present at first paint in an SSR app."},
"`tempo` scales every motion duration: 1 is Astryx's own, 0.75 the quickest and 1.5 the slowest (values outside are clamped).",
160
160
"`character` sets how lively motion is: `'crisp'` decelerates without overshoot, `'standard'` is Astryx's own, and `'expressive'` overshoots slightly on entrances and moves. Exits and fades never overshoot.",
161
-
"`reducedMotion: 'always'` reduces motion for everyone, as if each person had turned on Reduce Motion. Not everything follows it yet: the theme's motion-keyed adaptation rules and the press release fade do, and components' other Reduce Motion styles don't yet. `'system'`, the default, follows each person's setting. No value loosens Reduce Motion.",
161
+
"`reducedMotion: 'system'`, the default and only value, follows each person's Reduce Motion setting. No theme loosens Reduce Motion.",
Copy file name to clipboardExpand all lines: packages/core/src/theme/Theme.doc.mjs
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -69,7 +69,7 @@ export const docs = {
69
69
type: 'DefinedTheme',
70
70
required: true,
71
71
description:
72
-
"Theme object to apply. Prefer built theme objects for static production themes; use runtime `defineTheme()` for dynamic themes. Its `motion` can set `character` (`'crisp' | 'standard' | 'expressive'`) and `reducedMotion` (`'system' | 'always'`).",
72
+
"Theme object to apply. Prefer built theme objects for static production themes; use runtime `defineTheme()` for dynamic themes. Its `motion` can set `character` (`'crisp' | 'standard' | 'expressive'`) and `reducedMotion` (`'system'`).",
0 commit comments