@reqvire-org/ads 0.5.9 → 0.5.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/ads-errors.mjs +68 -4
  2. package/dist/analysis/owner-source.mjs +16 -2
  3. package/dist/asset-declaration.d.mts +5 -0
  4. package/dist/asset-declaration.mjs +8 -2
  5. package/dist/asset-model.mjs +3 -0
  6. package/dist/construction-output.mjs +36 -7
  7. package/dist/construction-spec.d.mts +109 -10
  8. package/dist/construction-spec.mjs +173 -45
  9. package/dist/end-alignment.mjs +17 -2
  10. package/dist/form-states.mjs +2 -2
  11. package/dist/grid-lowering.mjs +24 -1
  12. package/dist/lowering-layer.mjs +11 -10
  13. package/dist/lowering-overlaps.mjs +5 -3
  14. package/dist/lowering-properties.mjs +13 -1
  15. package/dist/lowering-region-layout.mjs +4 -4
  16. package/dist/lowering-sequence.mjs +6 -2
  17. package/dist/measured-geometry.mjs +15 -3
  18. package/dist/owner-analysis-check.mjs +3 -0
  19. package/dist/owner-errors.mjs +6 -0
  20. package/dist/ownership-model.mjs +34 -9
  21. package/dist/platform-features.mjs +12 -0
  22. package/dist/press-scale.mjs +3 -1
  23. package/dist/profile-macro.d.mts +5 -0
  24. package/dist/profile-view-facts.mjs +1 -1
  25. package/dist/recipe-macro.d.mts +53 -6
  26. package/dist/recipe-model.mjs +8 -5
  27. package/dist/region-lowering.mjs +398 -30
  28. package/dist/role-vocabulary.d.mts +12 -1
  29. package/dist/role-vocabulary.mjs +21 -3
  30. package/dist/skills/ads-designer/references/motion.md +4 -1
  31. package/dist/skills/ads-designer/references/recipes.md +36 -3
  32. package/dist/skills/ads-import/references/recipes.md +36 -3
  33. package/dist/skills/ads-port/references/recipes.md +36 -3
  34. package/dist/spatial-model.mjs +11 -2
  35. package/dist/surface-effects.mjs +25 -6
  36. package/dist/token-dtcg.mjs +2 -1
  37. package/docs/ARCHITECTURE.md +8 -0
  38. package/docs/ASSETS.md +7 -1
  39. package/docs/CHANGELOG.md +143 -18
  40. package/docs/GUIDE.md +9 -0
  41. package/docs/LANGUAGE.md +137 -17
  42. package/docs/MOTION.md +45 -0
  43. package/docs/PROFILE-KINDS.md +32 -5
  44. package/docs/RULES.md +13 -5
  45. package/docs/TOKEN-ROLES.md +9 -2
  46. package/package.json +1 -1
package/docs/CHANGELOG.md CHANGED
@@ -1,53 +1,178 @@
1
1
  # Changelog
2
2
 
3
- ## 0.5.9
3
+ ## 0.5.11
4
4
 
5
5
  <!-- ads-local-tests:start -->
6
6
  Hot patch: the unit and integration groups; the browser group was not run.
7
- Local verification: **1850/1850 passed** with `bun run test:hotpatch`.
8
- Tested commit: `d5d38781ec97f5a8027b2813b631f3a2cc28fcba`; Bun 1.4.4.
9
- Completed 2026-11-24T14:53:56.818Z (1267 seconds).
7
+ Local verification: **1891/1891 passed** with `bun run test:hotpatch`.
8
+ Tested commit: `648d91c76fb65290d62f65e2176c88aee9c0e2ef`; Bun 1.4.4.
9
+ Completed 2026-11-25T19:51:24.944Z (1495 seconds).
10
10
 
11
11
  <!-- ads-local-test-proof
12
12
  {
13
13
  "schema": 3,
14
- "version": "0.5.9",
15
- "commit": "d5d38781ec97f5a8027b2813b631f3a2cc28fcba",
16
- "sourceSha256": "bc5fc627cf6a4509b875df54976999f27420a146b7f0f6230466f1d5815cd6c7",
14
+ "version": "0.5.11",
15
+ "commit": "648d91c76fb65290d62f65e2176c88aee9c0e2ef",
16
+ "sourceSha256": "6af1e0c2748d4d6e23a40ab159cb246d045c9967dffd42aae97be75c59369e76",
17
17
  "command": "bun run test:hotpatch",
18
18
  "scope": "hotpatch",
19
19
  "result": "pass",
20
- "tests": 1850,
21
- "pass": 1850,
20
+ "tests": 1891,
21
+ "pass": 1891,
22
22
  "fail": 0,
23
23
  "skipped": 0,
24
24
  "groups": [
25
25
  {
26
26
  "name": "unit",
27
- "tests": 842,
28
- "pass": 842,
27
+ "tests": 846,
28
+ "pass": 846,
29
29
  "fail": 0,
30
30
  "skipped": 0,
31
- "reportSha256": "3e3484b5d9645fa102b872cefa7ca4b851dee3e24288df9ca7e45999f340e502"
31
+ "reportSha256": "6345564f7e950a85afc5eb2836448966e6f8091e9f91c0085bf8cdca8a06c44b"
32
32
  },
33
33
  {
34
34
  "name": "integration",
35
- "tests": 1008,
36
- "pass": 1008,
35
+ "tests": 1045,
36
+ "pass": 1045,
37
37
  "fail": 0,
38
38
  "skipped": 0,
39
- "reportSha256": "1c137683cc4a84a32e13a0e46386c7ec5c960b227d9732d4b9b5bb821c5f3b83"
39
+ "reportSha256": "2d7516ff31fc5441401354209e1eea1097f5a0755ab8ab545c2f88ea6b553a59"
40
40
  }
41
41
  ],
42
42
  "testOverrides": {},
43
43
  "bun": "1.4.4",
44
- "completedAt": "2026-11-24T14:53:56.818Z",
45
- "durationMs": 1266621,
46
- "logSha256": "ab072db4f97918a409c96d780ae4014855e2953f8a312230a4b850dd97b3ff96"
44
+ "completedAt": "2026-11-25T19:51:24.944Z",
45
+ "durationMs": 1495008,
46
+ "logSha256": "19d24c850349946e6edc2c724e14de7feeabdfa426b6c9e2f64c40ffba87d743"
47
47
  }
48
48
  -->
49
49
  <!-- ads-local-tests:end -->
50
50
 
51
+ - *A scrolling element's scrollbar colours and width.* A surface's
52
+ `scrollbarThumb` and `scrollbarTrack` (paints, set together) are written as
53
+ `scrollbar-color`, and `scrollbarWidth`, a token of the new
54
+ `scrollbar-width` role (`auto`, `thin` or `none`), as `scrollbar-width`. They
55
+ belong to an element whose `overflow` scrolls, and the thumb needs 3:1
56
+ against the track in every theme and brand. Baseline since December 2025; an
57
+ older browser keeps its own scrollbar.
58
+
59
+ ## 0.5.10
60
+
61
+ Changes an existing design may notice: an `inline` row directly in block flow
62
+ that states its own space (`spaceBefore`, `spaceAfter`, `spacing`) now starts its
63
+ own line and collapses its space with its neighbours' (#46); a row beside inline
64
+ text without space of its own is unchanged. Everything else below is new
65
+ vocabulary or a check that refused valid designs and no longer does.
66
+
67
+ - *A scale can grow from an edge* (`origin`, on a root or part; reported as
68
+ #97). `"inline-start"`, `"inline-end"`, `"block-start"` or `"block-end"` set
69
+ where the element's scales and rotation grow from, in states, entrances and
70
+ sequences alike; inline edges are mirrored under right-to-left. An underline
71
+ can now stretch in from its start instead of sliding in. `"center"` stays the
72
+ default.
73
+ - *Fixed: a gap gutter is checked against the grid that uses it* (#41). A gap
74
+ gutter's width was checked as if it sat between every page-grid column, so a
75
+ two-column FAQ with a 72 px gap "left no track width" on phones. The check
76
+ now counts the gaps of the grid that uses the gutter (its local `columns`, or
77
+ the page grid's), at every tier.
78
+ - *Fixed: false `ambiguous-overlap` on a stack part's space* (#44). A part's
79
+ space after (`head + :not(:first-child)`) and a margin reset two levels inside
80
+ that part were taken as possibly one element. Selectors of children and
81
+ adjacent siblings from the root fix their target's depth: different depths
82
+ are different elements.
83
+ - *Fixed: a light/dark image pair rendered under a condition* (#31) is a content
84
+ image. The combination that leaves the pair out no longer reports "not a
85
+ content image" or an unmeasurable intrinsic size.
86
+ - *Fixed: end alignment of a tinted band across a card* (#45). In a card that
87
+ paints its own box with no inline padding, a painted part's edge is the
88
+ card's edge, not a line the other blocks' content ends on.
89
+ - *A slider that fills up to its handle, with its steps under it* (#32). A
90
+ range slider's `sliderFill` is drawn up to the thumb: Firefox's own progress
91
+ part, and elsewhere the track painted up to a measured `share` the owner
92
+ writes at render. A row of step labels `along` the slider centres each label
93
+ under the thumb's place for its step. The thumb takes its surface's shadow,
94
+ grows by a motion field while pointed at or dragged (`grow`), and shows the
95
+ focus indicator. Its 3:1 against the track may come from its ring. New codes:
96
+ `construction/slider-fill-unsupported`, `construction/slider-steps-unsupported`.
97
+ Fixed: a slider treatment's `when` takes `{ surface }` in its type, as the
98
+ parser always required.
99
+ - *A header's menu drops from under its trigger* (#24). A popover's layer
100
+ `motion: "drop"` fades it while it comes down its motion profile's `distance`
101
+ from its `scale`, growing from its top edge, and sends it back up as it
102
+ closes; reduced motion shows it at once. A measured popover's layer profile
103
+ takes `anchorGap` or `anchorOverlap` and `anchorOutdent` or `anchorIndent`,
104
+ added to the measured position, so the owner reports only where the trigger
105
+ is and the distance stays design.
106
+ - *Groups inside a drawing, drawn lines and labels on a drawing* (#30, #98).
107
+ An asset declares named `groups` its SVG marks (`data-group`); a visual or
108
+ decoration part's `groups` plays sequences on them, so a wordmark's letters
109
+ drop in turn and a diagram's dots appear. A sequence step `draw: "hidden" |
110
+ "drawn"` reveals a line along its `pathLength="1"`; `play: { paused: true }`
111
+ holds a sequence at its first step under one owner state until another plays
112
+ it. A text part's `anchor: { artwork, x, y }` places real, checked text on a
113
+ sibling decoration's drawing in its own coordinates. New codes:
114
+ `construction/artwork-group-unknown`, `construction/artwork-group-draw-length`,
115
+ `construction/text-anchor-unsupported`. Also fixed: two rules whose target
116
+ states exclude each other (`[data-group="edges"]`, `[data-group="nodes"]`) are
117
+ no longer an ambiguous overlap, whatever their paths.
118
+ - *Tone filters for content images*: a surface's `grayscale` and `invert`
119
+ (new token roles, nonnegative percentages) beside `brightness`, composed in
120
+ one order, so a grey logo made for a light page shows as light marks in the
121
+ dark theme (v2's `grayscale(1) invert(1) brightness(1.8)`). A visual part's
122
+ only, as `brightness` is (`construction/surface-effect-misplaced`).
123
+ - *Rules between arranged items* (`between: { surface, frame, axes }`, #25):
124
+ hairlines between rows, between items in a row, or between a fluid grid's
125
+ columns and rows, wherever the arrangement puts its items at every width (a
126
+ logo band at 2, 3 and 6 columns, partial rows included), centred in the gap.
127
+ Each item draws the rules on its start sides and the host clips the
128
+ outermost, in plain CSS every engine renders the same; CSS gap decorations
129
+ replace it once they are Baseline. `construction/between-axes-unsupported`
130
+ refuses an axis the arrangement does not separate on.
131
+ - *Decorations* (`kind: "decoration"`, #29). Artwork or a pattern that means
132
+ nothing (a graph behind a panel, a dot grid, a glow, a page backdrop) is a
133
+ part ADS lays behind its parent's content: it fills the parent's box (or the
134
+ viewport, `attachment: "fixed"`), may spill past it by `outset`, and its
135
+ artwork is cropped or contained against its own size in any paint mode, a
136
+ themed drawing included, with no ratio box. It is `aria-hidden` and inert by
137
+ construction (`source/decoration-exposed`); text over it is the review note
138
+ `review/decoration-under-text`, measured by the render audit.
139
+ - *A tiled background* (#28): a surface's `backgroundTile` repeats its
140
+ `backgroundImage` gradient at that square size (`background-size`,
141
+ `background-repeat`), so a banner can carry a dot grid.
142
+ - *A part's box takes `rules` and `corners`, and changes them under a named
143
+ condition* (#34), as a root frame does: a split card's tinted side moves its
144
+ hairline and rounded corners when the card goes side by side.
145
+ - *Alignment under a named condition* (#27): `at: { "<condition>": { align,
146
+ justify, textAlign } }` on a root or a part, so a banner is centred on phones
147
+ and start-aligned from a width.
148
+ - *Sticky on an inline edge* (#43): `sticky: { edge: "inline-start" }` (or
149
+ `"inline-end"`) keeps a table's row-name column in place while its frame
150
+ scrolls sideways, following the writing direction.
151
+ - *A part's enlarged hit area* (#23): a part's frame profile with
152
+ `minTargetBlockSize` / `minTargetInlineSize` gets the same invisible hit
153
+ region a control's does, so a menu trigger's pointer area can span the gap
154
+ to its panel without moving layout.
155
+ - *Safe-area insets* (#26): `safeArea: ["block-end", …]` on a root's frame or
156
+ a part's `frame: { profile }` adds `env(safe-area-inset-*)` to those sides'
157
+ padding (a phone menu's bottom row above the home indicator).
158
+ - *A root travels under its states* (#40): `translateBlock` / `translateInline`
159
+ from the motion slot in a root `when` entry and `translate` in its
160
+ `transition`, so a link card lifts as a whole on hover.
161
+ - *A part's `normalize` takes `pointerEvents: "none"` and `textDecoration`*
162
+ (#22, #40): a decorative layer over interactive content at any depth (checked
163
+ to be decorative), and a link card's link without its underline.
164
+ - *`overscroll: "contain"`* beside a scrolling `overflow` (#33): a dialog's
165
+ results list keeps its scroll to itself.
166
+ - *A row in block flow that states its own space is a block* (#46): its space
167
+ collapses with the previous block's (a buttons row after an article's last
168
+ paragraph), keeping its content's width. A row without space of its own
169
+ stays inline-level beside inline text.
170
+ - The block-flow docs say when the automatic flush does not apply: a flow that
171
+ is a component's root inside another component's padding (Content inside a
172
+ Callout) declares `flow: { edges: "trim" }`.
173
+
174
+ ## 0.5.9
175
+
51
176
  - *The state switch and live controls moved into the showcase header.* A
52
177
  scenario's states and controls stand in a second header row over the preview
53
178
  column only, in the showcase's own chrome, and hide with the header. The
package/docs/GUIDE.md CHANGED
@@ -1186,6 +1186,15 @@ known.
1186
1186
  timing, a disabled control looks enabled: select an inactive surface there,
1187
1187
  or lower its opacity. A hover held off with `:not(:disabled)` alone declares
1188
1188
  no disabled state; it does not prove the control can be disabled.
1189
+ - A decoration (`kind: "decoration"`, [LANGUAGE.md](LANGUAGE.md#decorations))
1190
+ means nothing: its element is `aria-hidden="true"` and holds nothing a person
1191
+ can use (`source/decoration-exposed`). Text in the same owner is drawn over
1192
+ it, so its contrast depends on the decoration's pixels: the review note
1193
+ `review/decoration-under-text` asks for a scenario, and the render audit
1194
+ measures the text in every theme.
1195
+ - A surface's tone filters (`grayscale`, `invert`, `brightness`) belong to a
1196
+ visual part: on a container they would change the colour of the text inside
1197
+ it without a contrast check (`construction/surface-effect-misplaced`).
1189
1198
 
1190
1199
  **State contrast** (owner analysis): an owner's `when` states pair the colour of
1191
1200
  one profile with the background of another, such as a colour-only error state
package/docs/LANGUAGE.md CHANGED
@@ -246,13 +246,18 @@ them all.
246
246
  | `drawnBy: "<sibling part>"` | region part holding a native control | the native control (a checkbox's `<input>`) is drawn by the named part: `position: absolute`, the drawing part's frame `inlineSize` and `blockSize`, no margin, `opacity: 0`, laid over that part, so it takes no room in the row and pointer and keyboard still reach the real control. Its states still reach the drawing part (`:has(> .input:checked)`) | the named part is not declared right after it, does not show its focus (`focus: { of }`) (`spec/value-invalid`), or its frame states no `inlineSize` or `blockSize` (`profile-field-missing`) |
247
247
  | `repeat: true` | region part (not a vector) | nothing of its own: the part's element renders once per item of a list (`tabs.map(…)`), any number of times (at least once when `required`), each instance taking the part's construction (`extent: "fill"` shares the row among them); a repeated `frame: "control"` part neighbours its own next instance, so their hit areas and spacing are checked across the gap | with `drawnBy` or `focus`, or named by another part's (`spec/value-invalid`); without it, a mapped part (`part-missing-or-repeated`) |
248
248
  | `kind: "component"` | region part | a public component placed with the part's marker (`<Heading className="ds-content-heading" …/>`), as a grid cell is: its interior is its owner's, so the part states placement only (`required`, `repeat`, `extent`, `at`, `spaceBefore`, `spaceAfter`) | any other field (`spec/field-unsupported`); a forwarded `className` that carries a recipe (`source/foreign-interior`) |
249
- | `spaceBefore` / `spaceAfter: { slot: "spacing", field }` | part of a `stack`, or of a parent without an arrangement (block flow: a list item that keeps its marker) | the part's own space before it and after it. In a stack, in place of the gap (`margin-block-start: calc(space - gap)` on the part, or on what follows it), the larger where two meet, the first part flush. In block flow, the part's own `margin-block-start` and `margin-block-end`, which the browser collapses: the larger where two meet, and a last block's space passes out through containers without padding or border (a list item, a component's root) to what follows them, so loose list items whose content is another component keep their space. A placed component (`kind: "component"`) takes its space the same way. Inside its own block padding or border, a block flow starts and ends flush (`> :first-child` loses its space before, `> :last-child` its space after): there the space could not pass out and would only add to the padding | another parent layout (`space-parent-unsupported`) |
249
+ | `spaceBefore` / `spaceAfter: { slot: "spacing", field }` | part of a `stack`, or of a parent without an arrangement (block flow: a list item that keeps its marker) | the part's own space before it and after it. In a stack, in place of the gap (`margin-block-start: calc(space - gap)` on the part, or on what follows it), the larger where two meet, the first part flush. In block flow, the part's own `margin-block-start` and `margin-block-end`, which the browser collapses: the larger where two meet, and a last block's space passes out through containers without padding or border (a list item, a component's root) to what follows them, so loose list items whose content is another component keep their space. A placed component (`kind: "component"`) takes its space the same way. A part laid out as an `inline` row that states its own space (`spaceBefore`, `spaceAfter`, `spacing`) is a block in block flow (`display: flex; inline-size: fit-content`, or its full width with `extent: "fill"`), so its space collapses with the blocks around it; a row without space of its own stays inline-level (`inline-flex`) and keeps its line beside inline text. Inside its own block padding or border, a block flow starts and ends flush (`> :first-child` loses its space before, `> :last-child` its space after): there the space could not pass out and would only add to the padding | another parent layout (`space-parent-unsupported`) |
250
250
  | `spacing: "<spacing profile>"` | part of a `stack` or block flow | the part's space before and after it from that profile's `spaceBefore` and `spaceAfter` fields, where a flow needs more distances than one spacing profile holds (a heading 44 px above and 14 px below, 24 px after a quote); the same "larger of the two" rule | a profile that states neither field (`profile-field-missing`) |
251
251
  | (a `stack` of blocks) | root, part recipe | the blocks a stack holds end on one line: a painted block by its outer edge, an unpainted one where its content ends (frame end padding, a grid's gutter end); one off by more than 1px and at most 64px fails (`source/end-misaligned`); text is not compared | n/a |
252
- | `flow: { edges: "trim" }` | block-flow root (no `layout`) | its first child's space before and its last child's space after become nothing, as a stack starts and ends flush: a page that opens with a heading starts at its top. Without it, a frameless block-flow root passes those spaces out, as CSS margins do (the loose list's item content) | `recipe.flow` on a root with a `layout` (`spec/value-invalid`) |
252
+ | `flow: { edges: "trim" }` | block-flow root (no `layout`) | its first child's space before and its last child's space after become nothing, as a stack starts and ends flush: a page that opens with a heading starts at its top. Without it, a frameless block-flow root passes those spaces out, as CSS margins do (the loose list's item content). The automatic flush applies only to padding or a border on the flow's own element: a flow that is a component's root placed inside another component's padding (Content inside a Callout) is frameless, so it declares this to end flush | `recipe.flow` on a root with a `layout` (`spec/value-invalid`) |
253
+ | `frame: { …, safeArea: ["block-end", …] }` (a root's frame; a part's `frame: { profile, safeArea }`) | root, part | each named side's padding plus `env(safe-area-inset-<side>, 0px)`: a phone's bottom bar above the home indicator; an inline side is written for left-to-right and mirrored under `:dir(rtl)` | a side outside `block-start`, `block-end`, `inline-start`, `inline-end` (`spec/value-invalid`) |
254
+ | `groups: { "<name>": { play?, when?: { "<owner state>": { play } } } }` | visual or decoration part | sequences played by named groups of the part's drawing (`<part> > svg [data-group]`), each around its own box; `play.paused` holds one at its first step under a state ([MOTION.md](MOTION.md#groups-inside-a-drawing)) | a group the drawing does not declare, or a drawing not shown as inline SVG (`artwork-group-unknown`); a drawn group without `pathLength="1"` (`artwork-group-draw-length`) |
255
+ | `anchor: { artwork, x, y, inline?, block? }` | text part | the text placed on a sibling decoration's drawing at `x`, `y` in the drawing's coordinates (its viewBox), aligned by its start, centre or end on each axis (`position: absolute`, a share of the parent's box): real, checked text over a diagram. The parent is sized to the drawing (`aspect-ratio` of its viewBox), so the drawing fills it exactly | an artwork that is not a sibling decoration with a drawing, labels on two drawings in one parent, or a parent that states its own block size or ratio (`text-anchor-unsupported`) |
256
+ | `origin: "center" \| "inline-start" \| "inline-end" \| "block-start" \| "block-end"` | root, part | where its scales and `rotate` grow from, in states, entrances and sequences alike (`transform-origin`; an inline edge also writes its mirror under `:dir(rtl)`); `"center"`, the default, writes nothing | another value (`spec/value-invalid`) |
253
257
  | `carry: true` | `stack` root | loose flow (a list whose items hold paragraphs, code, figures): the stack gives its gap to its children (`--ads-flow-gap`), and its last part's own space after carries out of it between items (`margin-block-end: max(0px, space - gap)`), so on a list and its item the next item starts at the larger of the list's gap and the item's last block's space after; after the last item the list's own space after applies | a root that is not a stack (`space-parent-unsupported`) |
254
258
  | a part rendered as `p`, `h1`–`h6`, `ul`, `ol`, `dl`, `dd`, `blockquote`, `figure`, `pre`, `hr`, `menu` | region part | `margin: 0`: the arrangement owns the space around a part, so the browser's margin is reset; a part that states its own margin (`normalize: { margin: 0 }`, now allowed on parts too) keeps it | n/a |
255
259
  | `between: { surface, frame }` | root, part | a rule between consecutive children: the frame profile's `borderWidth` and `borderStyle`, painted by the surface's `borderColor`, on `& > * + *` (`border-block-start`, or `border-inline-start` in a row): a hairline between table rows or settings rows, none after the last | a frame without `borderWidth` or a surface without `borderColor` (`profile-field-missing`) |
260
+ | `between: { surface, frame, axes: ["inline", "block"] }` | root, part, fluid grid | rules between the arranged items on the named axes, wherever the arrangement puts them: a stack's (or block flow's) on the block axis, a single-line row's on the inline axis, a wrapping row's or a grid's on either or both, at every width (a logo band's hairlines at 2, 3 and 6 columns, a partial last row included). Each item draws, in its `::before`, the rules on its start sides, centred in the gap (just before the item where the gap is narrower than the rule); a stack's or row's only after an earlier item, a wrapping row's and a grid's always, the host clipping the outermost (`overflow: clip`). Decorations are not items. A focus outline an edge clips is reported by the render audit (`focus-clipped`) | an axis the arrangement does not separate on, a layered parent, or an item whose `::before` is taken (`construction/between-axes-unsupported`); a grid's `between` without `axes` (`spec/value-invalid`) |
256
261
  | `presence: "assistive"` | part | hidden on screen and still read by assistive technology (a table caption, a skip link's text): a one-pixel clipped box out of the flow | n/a |
257
262
  | `pseudo: { marker: { surface?, text?, content?, when? } }` | root or part rendered as `li` or `summary` | `::marker`: a colour-only surface (and its states), a text profile of weight and numerals (`fontWeight`, `fontFeatureSettings`), generated content; its contrast is proven where the item is placed (3:1 for a bullet, the text minimum for a number) | another host (`pseudo-host-unsupported`); a surface or text profile that states more (`pseudo-surface-unsupported`) |
258
263
  | `pseudo: { before: { content, surface?, text?, when? } }` | root or part that is not a replaced element | `::before` with generated content (a section number), in its colour and weight; proven as text | an `img`, `input`, `select`, `textarea`, `video`, `iframe`, `br`, `hr` or `svg` host (`pseudo-host-unsupported`) |
@@ -260,7 +265,7 @@ them all.
260
265
  | `counter: { reset?, increment? }` | root, part | `counter-reset` where a count starts, `counter-increment` on what it counts; names are shared across components (a `List` resets, a `ListItem` increments); `list-item` is the browser's own list counter | a CSS keyword as a name (`spec/value-invalid`) |
261
266
  | `markers: [<style per depth>]` | a list root | `list-style-type` on the list and on the same list nested at each depth (`& li &`), outermost first; deeper lists keep the last: bullets (`disc`, `circle`, `square`, `none`) or a number system | more than three, or an unknown style (`spec/value-invalid`) |
262
267
  | `anchorClear: { slot: "layer", field: "clearBlockStart" }` or `{ slot: "spacing", field: "anchorGap" }` | root (not a top-layer root), part | `scroll-margin-block-start`: where a jump to the element (a fragment link, `scrollIntoView`) lands below the top of its scroll container. The layer profile's `clearBlockStart` puts it right under the region sticky elements clear; the spacing profile's `anchorGap` is the element's own distance, for a target that lines up with something beside it (a heading level with a sticky side column). Layout is unchanged. ADS does not check that the distance clears what is stuck on the page the owner ends up in | another slot or field (`spec/value-invalid`); on a top-layer root (`spec/field-unsupported`) |
263
- | `overflow: "clip" \| "scroll-block" \| "scroll-inline" \| "scroll-both"` | root, part | `overflow` (physical x/y pair of the horizontal writing mode) and a released axis minimum | on a top-layer root (`profile-provider-conflict`); with truncation |
268
+ | `overflow: "clip" \| "scroll-block" \| "scroll-inline" \| "scroll-both"` | root, part | `overflow` (physical x/y pair of the horizontal writing mode) and a released axis minimum. With `overscroll: "contain"` beside a scrolling value, `overscroll-behavior: contain`: reaching its end does not scroll the dialog or page behind it | on a top-layer root (`profile-provider-conflict`); with truncation |
264
269
  | `justify: "space-between" \| "space-around" \| "space-evenly"` | inline or stack root, part | `justify-content`: the free space between the items (a logo at the start, actions at the end); a wrapping row distributes each line | `field-unsupported` on a layered element (its layers share one area) |
265
270
  | `align` / `justify` on an element that scrolls | root, part | `safe center` / `safe end` on the axis the element itself scrolls: content stays aligned while it fits and starts at the scroll origin when it overflows, so its start is never unreachable | n/a (automatic) |
266
271
  | a rounded frame (`radius`) with visible overflow | region root | n/a | a first or last part of a stack, or a layer, that paints a background over a corner with no inset there (`construction/corner-overpaint`): clip the root, inset it, or round the part |
@@ -273,10 +278,12 @@ them all.
273
278
  | control `layout: "stack"` | control | visual above label; the control box centres visual + gap + line | `justify` |
274
279
  | `at: { "<condition>": { visible } }` | part | `display: none` inside the condition's range, the part's own display inside its complement | unknown condition (`condition-unknown`); a required part hidden (`condition-hides-required`); more than one condition |
275
280
  | `at: { "<condition>": { visual: "<visual profile>" } }` | visual part (`kind: "visual"`) | the part's geometry at that profile's size, inside the condition's range; may stand beside `visible` | a part that is not a visual, cropped or inspected media, or a size that selects another drawing of the asset (`construction/condition-visual-unsupported`) |
281
+ | `frame: { profile, rules?, corners? }`; `at: { "<condition>": { frame: { rules?, corners? } } }` | part with its own box | the box's one-sided rules and rounded corners as a root frame's, and under the condition only what the condition changes: a tinted side with a hairline on top and rounded bottom corners while stacked, on its start side and end corners beside | a frame change on a part without its own box; condition `rules` on a box without `rules` (`spec/value-invalid`) |
282
+ | `at: { "<condition>": { align?, justify?, textAlign? } }` | region root, part | the element's arrangement alignment (`align-items`, `justify-content`) and `text-align` inside the condition's range, its own outside it: a banner centred on phones and start-aligned from a width; a root's alignment needs no `frame` | unknown condition (`condition-unknown`); an entry that changes nothing (`spec/value-invalid`) |
276
283
  | `recipe.conditionQuery["<condition>"]` | owner code | the literal media range the CSS writes (`(width < 47.5rem)`), for `matchMedia` | the recipe's spatial profile lacks it (`choice/recipe-access-unsupported`) |
277
284
  | `element: "iframe" \| "select" \| "search-input" \| "text-input" \| "table" \| "header-cell" \| "cell" \| "list" \| "summary" \| "document"`, `marker: "none"` | root, part (`document`: a pattern's root only) | the element's closed UA normalization (no iframe border, list markers or summary marker; collapsed table; start-aligned, middle cells) | another tag (`source/part-element-mismatch`); a summary outside `<details>` (`source/summary-outside-details`) |
278
285
  | `align: "start" \| "center" \| "end"` on a cell (`element: "cell" \| "header-cell"`); `extent: "container"` on a table root | cell; table root | `vertical-align: top \| middle \| bottom` (rows whose cells wrap to different line counts start together at the top); `inline-size: 100%` (a table as wide as its container instead of its content) | `align` on any other part (`field-unsupported`); a table frame that fixes its width as well (`extent-conflict`) |
279
- | `normalize: { textDecoration: "none", pointerEvents: "none", borderStyle: "none" }` | root, `normalize.when` | `text-decoration-line`, `pointer-events`, `border-style` | pointer transparency on focusable or interactive, non-`aria-hidden` markup (`source/pointer-transparent-interactive`) |
286
+ | `normalize: { textDecoration: "none", pointerEvents: "none", borderStyle: "none" }` | root, `normalize.when`; `textDecoration` and `pointerEvents` also on a part (a link card's link, a decorative layer at any depth) | `text-decoration-line`, `pointer-events`, `border-style` | pointer transparency on focusable or interactive, non-`aria-hidden` markup (`source/pointer-transparent-interactive`) |
280
287
  | `normalize: { cursor, touchAction, userSelect }`, `snap` | root, part, `normalize.when`; scrolling arrangement | see [interaction properties](#interaction-properties) | a value outside its set (`spec/value-invalid`); snap without scrolling (`snap-without-scroll`) |
281
288
  | `wrap: "anywhere" \| "never" \| "truncate" \| "balance" \| "pretty" \| "preserve"` (`true` = anywhere), `textAlign`, `reserveLines: 1–3` | text part | `overflow-wrap`, `white-space`, one-line ellipsis truncation, `text-wrap: balance \| pretty` (without support: normal wrapping); `"preserve"`: `white-space: pre-wrap` with `overflow-wrap: anywhere`, so code keeps its spaces and line breaks and a long line continues on the next visual line (all of it visible at the column's width; `overflow: "scroll-inline"` on its block keeps lines whole instead); `text-align`; `min-block-size: Nlh` | reserved lines without a text profile (`reserve-without-text`) |
282
289
  | `wrap: "truncate", lines: 2 \| 3` | text part | a clamp: at most N lines, the last ending in "…" (`line-clamp` beside `display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp`, `overflow: hidden`) | `lines: 1` or another value (one line is plain `truncate`); `reserveLines` above `lines` (`spec/value-invalid` at `reserveLines`, naming both); `lines` with another `wrap`; on a declared `element`; an arrangement's display (`extent-conflict`); on, or inside, a control or form label (`source/clamp-on-control`) |
@@ -454,15 +461,55 @@ range: { selector: ".price-range", required: true,
454
461
  pseudo: { sliderTrack: { surface: "slider-track", frame: "slider-track-frame" }, sliderThumb: { surface: "slider-thumb", frame: "slider-thumb-frame" } } },
455
462
  ```
456
463
 
457
- Each takes a surface (`background`, `borderColor`) and a frame profile
458
- (`inlineSize`, `blockSize`, `radius`, `borderWidth`), with `when` surfaces for
459
- states. ADS turns off the engine's drawing and writes each once per engine
460
- (`::-webkit-slider-runnable-track`, `::-moz-range-track`,
464
+ <a id="range-sliders"></a>
465
+ Each takes a surface (`background`, `borderColor`, `boxShadow`) and a frame
466
+ profile (`inlineSize`, `blockSize`, `radius`, `borderWidth`), with `when`
467
+ surfaces for states. ADS turns off the engine's drawing and writes each once per
468
+ engine (`::-webkit-slider-runnable-track`, `::-moz-range-track`,
461
469
  `::-webkit-slider-thumb`, `::-moz-range-thumb`), and centres the WebKit thumb on
462
- the track by half their difference in height. Tick labels under the slider are a
463
- row with `justify: "space-between"`, one label per step. The thumb's
464
- background needs 3:1 against the track's in every theme, brand and state, as a
465
- progress fill against its track (`construction/progress-contrast-insufficient`).
470
+ the track by half their difference in height. The thumb's boundary needs 3:1
471
+ against the track in every theme, brand and state, as a progress fill against
472
+ its track (`construction/progress-contrast-insufficient`): its background, or
473
+ the ring its frame's border draws (a white handle with a coloured ring).
474
+ Disabled states are exempt.
475
+
476
+ A pricing calculator's slider fills up to its handle, grows the handle under
477
+ the pointer and writes its steps under it:
478
+
479
+ ```ts
480
+ input: { selector: ".price-range", required: true,
481
+ measured: { fill: { type: "share", property: "slider-fill" } },
482
+ pseudo: {
483
+ sliderTrack: { surface: "slider-track", frame: "slider-track-frame" },
484
+ sliderFill: { surface: "slider-fill", when: { "&:has(> .price-range:disabled)": { surface: "slider-track" } } },
485
+ sliderThumb: { surface: "slider-thumb", frame: "slider-thumb-frame", grow: { slot: "motion", field: "scale" } },
486
+ } },
487
+ steps: { selector: ".price-steps", required: true, along: "input",
488
+ measured: { step: { type: "share", property: "slider-step" } },
489
+ parts: { step: { selector: ".price-step", required: true, repeat: true, kind: "text" } } },
490
+ ```
491
+
492
+ - **The fill** (`sliderFill`, a surface with `when` states) is drawn on the
493
+ track up to the thumb. Firefox draws it itself (`::-moz-range-progress`, at
494
+ the track's size and radius); WebKit and Blink paint the track in the fill's
495
+ colour up to the measured share, from the side the slider starts on
496
+ (mirrored under right-to-left). The owner writes the share at render,
497
+ `measured.props({ fill: (value - min) / (max - min) })`, so the first paint
498
+ is right. The fill needs 3:1 against the track, as a progress bar. A fill
499
+ needs the track and a share (`construction/slider-fill-unsupported`); a
500
+ `slider-fill` share needs a fill (`construction/measured-property-unsupported`).
501
+ - **The thumb** takes its surface's `boxShadow`; `grow` scales it by a motion
502
+ field while it is pointed at or dragged and enabled, over the motion profile's
503
+ timing, at once under reduced motion. With a focus profile in the recipe's
504
+ focus slot, the focus indicator is drawn on the thumb, where the value is, in
505
+ place of one around the whole control.
506
+ - **Step labels** are a row `along` a sibling slider part, with no layout of its
507
+ own: it is inset by half the thumb frame's `inlineSize`, so each end's thumb
508
+ centre is a label's centre, and each label is centred at its own
509
+ `slider-step` share (`measured.props({ step: … })` on the label), whether or
510
+ not the steps are evenly spaced. A row that names no sibling with a sized
511
+ thumb, declares no share or has a layout is
512
+ `construction/slider-steps-unsupported`.
466
513
 
467
514
  **Contrast**, in every theme, brand and token condition:
468
515
 
@@ -673,7 +720,64 @@ const page = recipe({
673
720
  - The layer profile's `stickyLayer` (role `layer`) stacks the element above
674
721
  positioned content that scrolls under it. Without it the element keeps its
675
722
  place in document order.
676
- - Only block edges stick. A top-layer root takes no `sticky`.
723
+ - Inline edges stick too: `edge: "inline-start"` keeps a table's row names in
724
+ place while its frame scrolls sideways (`overflow: "scroll-inline"` on an
725
+ ancestor). They follow the writing direction (`inset-inline-start`). A
726
+ sticky column covers the content scrolling under it only when it paints a
727
+ background: give it, or its row, a surface. `clear` is for the block-start
728
+ edge only. A top-layer root takes no `sticky`.
729
+
730
+ ## Decorations
731
+
732
+ A decoration is artwork or a pattern that means nothing: a graph behind a
733
+ panel, a dot grid behind a banner, a glow behind a hero, a page's backdrop. It
734
+ is a part of `kind: "decoration"`, on a region root or any part, and lies behind
735
+ that element's content.
736
+
737
+ ```ts
738
+ const panel = recipe({ layout: "stack", parts: {
739
+ graph: { selector: ".ux-panel-graph", required: true, kind: "decoration", surface: "graph-fade" },
740
+ title: { selector: ".ux-panel-title", required: true, kind: "text" },
741
+ } }).root;
742
+ const graph = recipe({ parts: { visual: { kind: "visual", asset: "panel-graph" } } });
743
+ // <section className={panel}>
744
+ // <span className={`ux-panel-graph ${graph.parts.visual}`} aria-hidden="true"
745
+ // dangerouslySetInnerHTML={{ __html: graph.assets.visual.source }} />
746
+ // <h2 className="ux-panel-title">…</h2>
747
+ // </section>
748
+ ```
749
+
750
+ - **Behind the content.** The decoration fills its parent's box
751
+ (`position: absolute; inset: 0; z-index: -1`), and the parent becomes its
752
+ containing block and its own stacking context (`position: relative`, unless
753
+ it is already positioned, and `isolation: isolate`), so the decoration never
754
+ slips behind the page or over another owner. The parent's content stays in
755
+ its flow; nothing is restructured into layers. Several decorations stack in
756
+ declaration order.
757
+ - **Painted by its surface, its artwork or both.** A surface paints a
758
+ gradient (`backgroundImage`), a pattern (`backgroundTile`), a fade (`mask`),
759
+ blur or opacity. Artwork is bound as a visual part's is, in any paint mode: a
760
+ themed (paint-slot) drawing stays inline SVG, so its theme's paints reach it.
761
+ - **Cropped against its own box.** The decoration is a size container, and its
762
+ drawing covers it (`fit: "cover"`, the default without a visual profile) or
763
+ is contained in it (`fit: "contain"`) by container query units, around the
764
+ drawing's optical centre. No ratio box is needed: the parent's box is its
765
+ shape, whatever its width and height.
766
+ - **Past the edge.** `outset` (spacing fields) lets a glow spill past the
767
+ parent's box; a parent that clips (`overflow: "clip"`, a card's corners) clips
768
+ it.
769
+ - **Attached.** `attachment: "scroll"` (the default) moves with the parent;
770
+ `attachment: "fixed"` keeps a page's backdrop in place while the page scrolls.
771
+ - **Responsive and animated.** `at` shows, hides or resizes it under a named
772
+ condition; `play` and `when` animate it, and reduced motion stops the motion.
773
+ - **Meaningless by construction.** Its element is `aria-hidden="true"` and
774
+ holds nothing a person can use (`source/decoration-exposed`); ADS writes
775
+ `pointer-events: none`, so it never takes a click or focus.
776
+ - **Text over it is measured.** Text in the same owner is drawn over the
777
+ decoration, whose pixels the static contrast check cannot see: the review
778
+ note `review/decoration-under-text` asks for a scenario, and the render audit
779
+ measures the text in every theme. Fade the decoration under text with a
780
+ surface `mask`.
677
781
 
678
782
  ## Top-layer roots
679
783
 
@@ -740,7 +844,12 @@ recipe({
740
844
  while open. Its root declares at least one measured inset or `translate`
741
845
  (`construction/measured-placement-missing`); `corner` and `clear` do not
742
846
  apply. CSS anchor positioning is not used: it cannot follow a pointer or a
743
- selection.
847
+ selection. The panel's distance from the anchor is design, not the script's:
848
+ the layer profile's `anchorGap`/`anchorOverlap` and
849
+ `anchorOutdent`/`anchorIndent` move it from the measured position
850
+ ([PROFILE-KINDS.md](PROFILE-KINDS.md#layer)). A menu under a sticky header
851
+ stays under its trigger while the page scrolls; under a trigger that scrolls,
852
+ the owner measures again while it is open.
744
853
 
745
854
  The compiler normalizes the UA box (inset, margin, padding, border, size
746
855
  limits) and writes the arrangement's `display` only under the native open state
@@ -752,7 +861,11 @@ transition cannot share the root's transition set
752
861
  (`construction/profile-provider-conflict`).
753
862
 
754
863
  Motion uses the recipe's motion slot with the `static` reduced policy: a sheet
755
- slides its own extent from its edge (`"slide"`), a popover fades (`"fade"`).
864
+ slides its own extent from its edge (`"slide"`), a popover fades (`"fade"`)
865
+ or drops (`"drop"`: it fades while coming down the motion profile's `distance`
866
+ from its `scale`, growing from its top edge, and goes back up as it closes: a
867
+ site header's menu). Reduced motion leaves a drop with neither travel nor
868
+ animation.
756
869
  Opening starts from `@starting-style` in every browser. Closing keeps
757
870
  `display` and `overlay` through `transition-behavior: allow-discrete`: a
758
871
  browser that can transition `overlay` animates the exit, any other closes at
@@ -824,6 +937,10 @@ Each `type` (setter value; place) has a closed property list:
824
937
  width and height from its centre, right and down positive, within ±0.5):
825
938
  `object-position` of a cropped application image, a top-level visual part
826
939
  whose visual profile declares `fit: "cover"`.
940
+ - `share` (a number from 0 to 1, how far along its range a value is):
941
+ `slider-fill`, the fill of a range slider with a `sliderFill` treatment, or
942
+ `slider-step`, the place of each step label in a row `along` a slider
943
+ ([range sliders](#range-sliders)). Written with `measured.props` at render.
827
944
 
828
945
  Rules:
829
946
 
@@ -916,8 +1033,11 @@ The fields occur in a root's or a part's `normalize` and in its `when`:
916
1033
 
917
1034
  Rules:
918
1035
 
919
- - A part's `normalize` takes only these three fields. A root's (region or
920
- control) also takes the native operations in
1036
+ - A part's `normalize` takes these three fields, `resize` (a `<textarea>`),
1037
+ `margin`, `textDecoration` (a link part whose underline is not its look) and
1038
+ `pointerEvents: "none"` (a decorative layer over interactive content, at any
1039
+ depth: it must be `aria-hidden` or free of interactive content, and never
1040
+ focusable). A root's (region or control) also takes the native operations in
921
1041
  [the authoring invariant](#the-authoring-invariant). A vector part takes none.
922
1042
  - A part `when` key is an owner state in the closed
923
1043
  [`when` grammar](#state-focus-and-motion). The rule is written under the
package/docs/MOTION.md CHANGED
@@ -206,6 +206,11 @@ const card = recipe({
206
206
  root rests at `scale: 1` and keeps it under reduced motion.
207
207
  - A `transition` channel needs its endpoint, an entry a `surface` or a `scale`,
208
208
  and the motion profile the `static` policy.
209
+ - A root may also travel under a state: `translateBlock` or `translateInline`
210
+ from its motion slot's `distance` (a link card that lifts as a whole on
211
+ hover), with `translate` in its `transition`. It rests at no travel, keeps
212
+ none under reduced motion, and inline travel is mirrored under right-to-left,
213
+ as a part's travel is.
209
214
  - A [top-layer root](LANGUAGE.md#top-layer-roots) takes no press
210
215
  (`spec/field-unsupported`).
211
216
  - A `frame: "container"` root that presses below 0.98 in some token context, or
@@ -309,6 +314,13 @@ recipe({
309
314
  three scales read the profile's `scale` and are one channel, so a state takes
310
315
  one of them. `rotate` turns the part in place by the profile's `angle`. A
311
316
  control's visual part takes the same scales and `rotate`.
317
+ - `origin` on a root or part sets where its scales and `rotate` grow from, in a
318
+ state, an entrance or a sequence alike: `"center"` (the default),
319
+ `"inline-start"`, `"inline-end"`, `"block-start"` or `"block-end"`. An
320
+ underline that stretches in from its start is `origin: "inline-start"` with a
321
+ `scaleInline` from 0. Inline edges are mirrored under right-to-left
322
+ (`transform-origin` has no logical keywords, so ADS writes the `:dir(rtl)`
323
+ rule).
312
324
  - `transition` lists the channels that animate: `translate`, `scale`, `rotate`. An effect
313
325
  whose channel is not listed applies at once. A listed channel without an
314
326
  effect is refused.
@@ -456,6 +468,39 @@ recipe({
456
468
  it. An indicator rendered only while work is in progress needs nothing more.
457
469
  - The older continuous rotation (`repeat: "continuous"` with `rotate` on a
458
470
  standalone artwork part) is unchanged.
471
+ - **Held, then played.** `play: { sequence, paused: true }` under one owner
472
+ state holds the element at its first step (`animation-play-state: paused`),
473
+ and the same sequence under another state plays it: a diagram armed before it
474
+ scrolls into view, played when it does. The owner switches the state.
475
+
476
+ ### Groups inside a drawing
477
+
478
+ A drawing's named groups play sequences of their own: a wordmark's letters
479
+ dropping in turn, a diagram's dots appearing and its edges drawing themselves.
480
+ The asset declares its groups (`groups: ["n", "e", "z"]`) and its SVG marks each
481
+ (`data-group="n"`, see [ASSETS.md](ASSETS.md)); a visual or decoration part
482
+ plays them:
483
+
484
+ ```ts
485
+ mark: { selector: ".ux-word", kind: "decoration", groups: {
486
+ z: { play: { sequence: "letter-drop" } }, // the last letter first
487
+ e: { play: { sequence: "letter-drop", order: 1 } },
488
+ n: { play: { sequence: "letter-drop", order: 2 } },
489
+ } },
490
+ edges: { when: { '&[data-play="armed"]': { play: { sequence: "edge-draw", paused: true } },
491
+ '&[data-play="true"]': { play: { sequence: "edge-draw", order: 3 } } } },
492
+ ```
493
+
494
+ - A group is `<part> > svg [data-group="<name>"]`: only a drawing shown as
495
+ inline SVG (paint slots or foreground) exposes its groups; an image document
496
+ (intrinsic paint) cannot be reached inside.
497
+ - Each group moves and scales around its own box (`transform-box: fill-box`,
498
+ `transform-origin: center`).
499
+ - A `draw` step reveals a line along its length: the group's shapes state
500
+ `pathLength="1"` in the SVG (`construction/artwork-group-draw-length`), and
501
+ ADS draws them as one dash of that length. At rest, and under reduced motion,
502
+ the line is drawn: the finished picture.
503
+ - A group the drawing does not declare is `construction/artwork-group-unknown`.
459
504
 
460
505
  ## Animating a measured value
461
506
 
@@ -104,10 +104,13 @@ The example design system's detailed text specimen is `profiles/Typography/detai
104
104
  Fields: `background`, `color`, `borderColor` and `textDecorationColor` (an
105
105
  underline's paint, which a state and a paint transition change like any paint)
106
106
  (`paint`), `boxShadow`
107
- (`shadow`), `backgroundImage` (`gradient`), `opacity` (`opacity`), the effects
107
+ (`shadow`), `backgroundImage` (`gradient`), `backgroundTile` (`spacing` or
108
+ `frame-size`: the image repeated at that square size over the box, a dot grid),
109
+ `opacity` (`opacity`), the effects
108
110
  `blur` and `backdropBlur` (`blur`), `backdropSaturate` (`saturation`),
109
111
  `shapeShadow` and `groupShadow` (`shadow`), `mask` (`gradient`), a paint per
110
- border side, and the policy field `state`.
112
+ border side, a scrollbar's `scrollbarThumb` and `scrollbarTrack` (`paint`) and
113
+ `scrollbarWidth` (`scrollbar-width`), and the policy field `state`.
111
114
 
112
115
  A shadow is a composite effect, not component-local raw offsets and colors.
113
116
  Light, dark and brand variants may resolve to different paints and shadows. In
@@ -238,6 +241,7 @@ effect fields into them in a fixed order, whatever order the profile states:
238
241
  | `backdropBlur` | `blur` | Blurs what is behind the element | `backdrop-filter: blur()` |
239
242
  | `backdropSaturate` | `saturation` | Makes what is behind the element more or less vivid | `backdrop-filter: saturate()` |
240
243
  | `brightness` | `brightness` | Dims or brightens a drawing: a picture with no dark version, dimmed in the dark theme (the token is `100%` in light and lower in dark). A visual part's only: text under it could not be proven readable (`construction/surface-effect-misplaced`) | `filter: brightness()`, first in the list |
244
+ | `grayscale`, `invert` | `grayscale`, `invert` | Tone a drawing: a grey logo made for a light page shown as light marks on a dark one (`0%` in light, `100%` in dark, with `brightness` above `100%`). A visual part's only, like `brightness`. The three compose in one order, `grayscale`, `invert`, `brightness`, whatever the surface lists | `filter: grayscale() invert() brightness()` |
241
245
 
242
246
  The element is blurred before its shadow is cast (`filter: blur() drop-shadow()`),
243
247
  and the backdrop is blurred before it is saturated
@@ -282,6 +286,21 @@ graph that fades toward the text beside it) or to an element whose `overflow`
282
286
  container its text would fade where it stands, which cannot be proven
283
287
  readable: `construction/surface-effect-misplaced`.
284
288
 
289
+ A scrolling element's scrollbar takes its colours and width from its surface:
290
+ `scrollbarThumb` and `scrollbarTrack` (paints, set together) are written as
291
+ `scrollbar-color`, and `scrollbarWidth` (a `scrollbar-width` token: `auto`,
292
+ `thin` or `none`) as `scrollbar-width`. They belong to an element whose
293
+ `overflow` scrolls (`construction/surface-effect-misplaced` elsewhere, or for a
294
+ thumb without its track). The thumb shows where the view is: 3:1 against the
295
+ track in every theme and brand (`construction/progress-contrast-insufficient`).
296
+ A browser without the properties keeps its own scrollbar. The page's own
297
+ scrollbar follows the theme through `color-scheme`.
298
+
299
+ ```ts
300
+ // tokens/Surfaces/scrollbar-width.ads.css: --list-scrollbar-width: thin;
301
+ profile({ name: "scrolling-list", kind: "surface", fields: { scrollbarThumb: "--outline-control", scrollbarTrack: "--surface-panel", scrollbarWidth: "--list-scrollbar-width" } });
302
+ ```
303
+
285
304
  ```ts
286
305
  // tokens/Surfaces/gradient.ads.css: --fade-inline-end: linear-gradient(to right, black 80%, transparent);
287
306
  profile({ name: "graph-fade", kind: "surface", fields: { mask: "--fade-inline-end" } });
@@ -455,8 +474,10 @@ profile({
455
474
  - A step states what the part looks like there: `opacity` (`opacity`),
456
475
  `translateInline` and `translateBlock` (`motion-distance`), one scale
457
476
  (`scale`, or `scaleInline` / `scaleBlock` for one axis; `motion-scale`) and
458
- `rotate` (`motion-angle`). A property a step leaves out is interpolated
459
- between the steps that state it.
477
+ `rotate` (`motion-angle`), and `draw: "hidden" | "drawn"` (a keyword, not a
478
+ token: a line revealed along its length, for shapes that state
479
+ `pathLength="1"`). A property a step leaves out is interpolated between the
480
+ steps that state it.
460
481
  - The steps run from `0` to `100`, at distinct whole percentages
461
482
  (`construction/sequence-steps-invalid`).
462
483
  - `repeat` is `"loop"` (the default), `"alternate"` or `"once"`. A loop ends
@@ -551,7 +572,13 @@ Places a top-layer root, such as an anchored popover, against the viewport
551
572
  ([top-layer roots](LANGUAGE.md#top-layer-roots)). Fields: `edgeGap` (`spacing`)
552
573
  from the block edge, `viewportMargin` (`spacing`) from the inline edge, and
553
574
  `clearBlockStart` (`layout-size`) for a fixed region it keeps clear of, such as
554
- a toolbar band. The clearance must resolve to a fixed length. A composite's
575
+ a toolbar band. The clearance must resolve to a fixed length. A measured
576
+ popover also takes its distance from what the owner anchors it to: `anchorGap`
577
+ (`spacing`) past the anchor's edge or `anchorOverlap` (`overlap`) into it on
578
+ the block axis, and `anchorOutdent` (`spacing`) before the anchor's start or
579
+ `anchorIndent` (`spacing`) after it on the inline axis; each pair is one or the
580
+ other (`construction/profile-provider-conflict`). ADS adds them to the measured
581
+ position, so the owner's script reports only where the trigger is. A composite's
555
582
  `layer-profile` slot selects the profile. A modal sheet is full height and
556
583
  attached to its edge, so it needs no layer profile.
557
584