@reqvire-org/ads 0.5.1 → 0.5.2
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.
- package/dist/ads-errors.mjs +110 -25
- package/dist/analysis/composition-axes.mjs +48 -0
- package/dist/analysis/construction-memo.mjs +38 -0
- package/dist/analysis/context.mjs +19 -0
- package/dist/analysis/design-reads.mjs +177 -0
- package/dist/analysis/factored-classes.mjs +90 -0
- package/dist/analysis/helpers.mjs +5 -7
- package/dist/analysis/native-project.mjs +12 -0
- package/dist/analysis/owner-analysis-cache.mjs +86 -23
- package/dist/analysis/owner-analysis-key.mjs +42 -10
- package/dist/analysis/owner-choices.mjs +23 -4
- package/dist/analysis/owner-composition.mjs +118 -33
- package/dist/analysis/owner-reuse.mjs +8 -6
- package/dist/analysis/owner-source.mjs +253 -76
- package/dist/analysis/scenario-keys.mjs +10 -7
- package/dist/analysis/service.mjs +50 -3
- package/dist/analysis/standalone.mjs +7 -4
- package/dist/analysis/syntax.mjs +59 -1
- package/dist/analysis/worker-protocol.mjs +14 -2
- package/dist/analysis/worker.mjs +32 -10
- package/dist/architecture-report.mjs +26 -0
- package/dist/asset-view-facts.mjs +16 -2
- package/dist/boundaries.mjs +26 -10
- package/dist/bun-compiler.mjs +2 -2
- package/dist/check-service.mjs +29 -17
- package/dist/check.mjs +13 -6
- package/dist/cli.mjs +1 -1
- package/dist/composed-keyline.mjs +2 -2
- package/dist/config.mjs +2 -1
- package/dist/construction-output.mjs +3 -2
- package/dist/construction-spec.d.mts +111 -6
- package/dist/construction-spec.mjs +172 -30
- package/dist/corner-overpaint.mjs +16 -4
- package/dist/derived-states.mjs +182 -0
- package/dist/design-inputs.mjs +18 -3
- package/dist/design-system-closure.mjs +12 -7
- package/dist/emit/contract.mjs +24 -5
- package/dist/emit/emission.mjs +6 -4
- package/dist/emit/integrity.mjs +8 -2
- package/dist/emit/output-watch.mjs +120 -0
- package/dist/emit/owner-emission-cache.mjs +4 -4
- package/dist/emit/preview-emitter.mjs +4 -2
- package/dist/emit/preview-tree.mjs +1 -1
- package/dist/emit/service.mjs +8 -2
- package/dist/finding-rules.mjs +3 -0
- package/dist/form-states.mjs +8 -0
- package/dist/frame-regions.mjs +29 -9
- package/dist/hover-geometry.mjs +15 -0
- package/dist/input-digests.mjs +17 -10
- package/dist/linaria/delivery.mjs +2 -0
- package/dist/lowering-properties.mjs +5 -0
- package/dist/lowering-region-layout.mjs +7 -2
- package/dist/mcp/build-status.mjs +9 -1
- package/dist/mcp/compiler-channel.mjs +11 -4
- package/dist/mcp/mutations.mjs +1 -0
- package/dist/mcp/preview-http.bundle.js +1 -1
- package/dist/mcp/preview-watch.mjs +2 -1
- package/dist/mcp/preview-widget.bundle.js +1 -1
- package/dist/motion-model.mjs +1 -1
- package/dist/owner-analysis-check.mjs +19 -5
- package/dist/owner-errors.mjs +4 -2
- package/dist/owner-lowering.mjs +71 -12
- package/dist/owner-scenarios.mjs +4 -1
- package/dist/ownership-model.mjs +18 -4
- package/dist/placeholder-contrast.mjs +17 -1
- package/dist/platform-features.mjs +10 -1
- package/dist/profile-view-facts.mjs +1 -1
- package/dist/recipe-macro.d.mts +72 -13
- package/dist/recipe-model.mjs +9 -5
- package/dist/region-lowering.mjs +238 -40
- package/dist/render-audit/layout-shift.page.mjs +24 -0
- package/dist/render-audit/render-states.mjs +122 -1
- package/dist/render-audit/render-states.page.mjs +140 -0
- package/dist/render-audit/worker.mjs +18 -3
- package/dist/render-audit.mjs +114 -1
- package/dist/role-vocabulary.d.mts +5 -0
- package/dist/role-vocabulary.mjs +12 -1
- package/dist/scenarios-compiler.mjs +20 -6
- package/dist/showcase/assets-view.mjs +29 -13
- package/dist/showcase/client.bundle.js +32 -32
- package/dist/showcase/http-client.bundle.js +15 -15
- package/dist/showcase/ui/ui.css +1 -1
- package/dist/showcase/ui/ui.js +4 -4
- package/dist/skills/ads-designer/references/accessibility.md +7 -0
- package/dist/skills/ads-designer/references/branding.md +13 -3
- package/dist/skills/ads-designer/references/contracts.md +5 -2
- package/dist/skills/ads-designer/references/design-data.md +1 -1
- package/dist/skills/ads-designer/references/layout.md +5 -1
- package/dist/skills/ads-designer/references/motion.md +9 -1
- package/dist/skills/ads-designer/references/recipes.md +27 -3
- package/dist/skills/ads-import/references/contracts.md +5 -2
- package/dist/skills/ads-import/references/design-data.md +1 -1
- package/dist/skills/ads-import/references/layout.md +5 -1
- package/dist/skills/ads-import/references/recipes.md +27 -3
- package/dist/skills/ads-migrate/SKILL.md +1 -0
- package/dist/skills/ads-migrate/references/0.5.1-to-0.5.2.md +185 -0
- package/dist/skills/ads-port/references/contracts.md +5 -2
- package/dist/skills/ads-port/references/design-data.md +1 -1
- package/dist/skills/ads-port/references/layout.md +5 -1
- package/dist/skills/ads-port/references/recipes.md +27 -3
- package/dist/surface-contrast.mjs +1 -0
- package/dist/surface-effects.mjs +5 -3
- package/dist/task-cache.mjs +8 -18
- package/dist/validation-checks.mjs +1 -1
- package/docs/ARCHITECTURE.md +63 -7
- package/docs/CACHING.md +152 -24
- package/docs/CHANGELOG.md +200 -23
- package/docs/GUIDE.md +45 -1
- package/docs/LANGUAGE.md +146 -8
- package/docs/MOTION.md +10 -2
- package/docs/PROFILE-KINDS.md +9 -1
- package/docs/RULES.md +22 -14
- package/docs/TOKEN-ROLES.md +7 -1
- package/package.json +1 -1
package/docs/RULES.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
<!-- Generated by scripts/sync-rule-reference.mjs from src/ads-errors.mts and src/finding-rules.mts. Do not edit: run `bun run sync:rule-reference`. -->
|
|
4
4
|
|
|
5
|
-
Every rule ADS reports, under its rule group:
|
|
5
|
+
Every rule ADS reports, under its rule group: 433 rules in 18 groups. A finding names its rule as a code,
|
|
6
6
|
`<domain>/<kind>`; the `check/<rule>` codes are the rules `ads check`, `ads validate`, the render audit and acceptance
|
|
7
7
|
report by their plain name (`check/a11y-reflow` is the finding `a11y-reflow`).
|
|
8
8
|
|
|
@@ -16,19 +16,19 @@ Fix findings in group order: earlier groups are often the cause of later ones. T
|
|
|
16
16
|
| Order | Group | Rules | Kind | What it means | How to fix |
|
|
17
17
|
| --- | --- | --- | --- | --- | --- |
|
|
18
18
|
| 1 | [syntax](#syntax) | 11 | violated | The source does not parse or type-check. | Fix these first and accept again: analysis needs a valid program, and later errors may be consequences. |
|
|
19
|
-
| 2 | [unresolved-reference](#unresolved-reference) |
|
|
19
|
+
| 2 | [unresolved-reference](#unresolved-reference) | 39 | violated | The source names something that does not exist in this revision. | Correct the name from the existing candidates. Declare a new one only when it is genuinely new design. |
|
|
20
20
|
| 3 | [boundary](#boundary) | 30 | violated | Code reaches across an ownership or production/development boundary. | Move the code to its owner or pass the value through public props. Do not add an exception or widen the boundary. |
|
|
21
21
|
| 4 | [design-bypass](#design-bypass) | 21 | violated | Styling or design values are supplied outside the design language. | Take the value from a profile, token or recipe instead of writing it in place. |
|
|
22
|
-
| 5 | [structure-mismatch](#structure-mismatch) |
|
|
23
|
-
| 6 | [accessibility-semantics](#accessibility-semantics) |
|
|
22
|
+
| 5 | [structure-mismatch](#structure-mismatch) | 47 | violated | Rendered markup does not match what its declaration promises. | Make the markup match the declaration: each declared part, cell and binding exactly once, in the declared order. Change the declaration only if it is wrong. |
|
|
23
|
+
| 6 | [accessibility-semantics](#accessibility-semantics) | 38 | violated | Owned markup or motion lacks required accessible semantics: a text alternative, an accessible name, keyboard access or reduced motion. | Add the missing semantics in the owning component (alt, aria-label, a native control, a reduced-motion value); do not suppress the check. |
|
|
24
24
|
| 7 | [project-files](#project-files) | 6 | violated | A required project file or declaration is missing, empty, undocumented or unused. | Add or complete the file the rule names (README, license, theme or brand values), or remove what nothing uses. |
|
|
25
25
|
| 8 | [wrong-value](#wrong-value) | 72 | violated | A value has the wrong kind, role or range for where it is used. | Choose one of the allowed values the error lists. |
|
|
26
|
-
| 9 | [conflict](#conflict) |
|
|
27
|
-
| 10 | [unanalyzable](#unanalyzable) |
|
|
26
|
+
| 9 | [conflict](#conflict) | 38 | violated | Two definitions claim the same thing, or a definition depends on itself. | Keep exactly one source of truth and remove or derive the other. |
|
|
27
|
+
| 10 | [unanalyzable](#unanalyzable) | 45 | unprovable | ADS cannot prove the rule holds; the design itself may be fine. | Rewrite into a form ADS can follow (literal unions, const records, typed props, JSX) without changing rendered behavior. |
|
|
28
28
|
| 11 | [unsupported](#unsupported) | 16 | unprovable | The construct is valid design that ADS does not support yet. | Use a supported alternative. If none fits, report the gap rather than working around the checks. |
|
|
29
29
|
| 12 | [rendered-check](#rendered-check) | 13 | violated | The rendered result breaks an accessibility, layout, contrast or performance requirement. | Inspect the failing scenario in its audit result or capture, then fix the owning style or markup; do not change the scenario to hide it. |
|
|
30
30
|
| 13 | [behavior-failed](#behavior-failed) | 4 | violated | A registered behavior guarantee failed or could not run. | Read the failing run with ads_results and ads_investigate, then fix the owner's behavior; keep the guarantee unless it is wrong. |
|
|
31
|
-
| 14 | [evidence-missing](#evidence-missing) |
|
|
31
|
+
| 14 | [evidence-missing](#evidence-missing) | 12 | rerun | Required evidence is absent or belongs to another revision. | Run the named check (ads_validate, ads_accept dryRun or the preview build) for the current revision; do not edit source to satisfy it. |
|
|
32
32
|
| 15 | [run-interrupted](#run-interrupted) | 12 | rerun | The run did not complete: it was cancelled, busy, or its inputs changed while it ran. | Wait for the other run or the edits to finish, then run again with the current revision. |
|
|
33
33
|
| 16 | [after-apply](#after-apply) | 7 | rerun | Source was published, but a follow-up step after it failed. | Do not accept the change again. Perform the named follow-up (rebuild the preview, regenerate assets, clean up the draft) and check the result. |
|
|
34
34
|
| 17 | [ads-defect](#ads-defect) | 16 | ads-defect | ADS produced inconsistent output; the project source is not at fault. | Stop. Do not rewrite source to avoid it; report it with the owner and the failing revision. |
|
|
@@ -71,7 +71,9 @@ The source names something that does not exist in this revision. Correct the nam
|
|
|
71
71
|
| `check/scenario-covers` | error | A scenario's covers is a nonempty static array, and every entry names a public UI export of the design system. | List the public UI exports the scenario renders in covers, by their exported names. | `ads://guides/scenarios` |
|
|
72
72
|
| `check/scenario-exercise-api` | error | Each exercises entry names a public behavioral API: a hook, controller, context provider or other callable or constructible export of the public barrel. | Name a public behavioral export in exercises (check the barrel's exports first), or remove the entry; rendered UI belongs in covers. | `ads://guides/scenarios`, `ads://guides/behaviors` |
|
|
73
73
|
| `check/source-unavailable` | error | Checked modules import only analysis inputs of this project, not files in assets.generatedPaths, nested projects, drafts or project metadata. | Import the source module instead, or remove the folder from assets.generatedPaths if it is source. | |
|
|
74
|
+
| `check/typescript-config-invalid` | error | ADS analyses the design system with the compiler options of the project's tsconfig.json and every configuration it extends, read from the checked revision; each of them parses, and every extends target it names by path is part of that revision. | Fix the reported configuration: correct its syntax or option, or point extends at a configuration file of this project (or an installed package). | |
|
|
74
75
|
| `choice/absent-property` | error | A design record is read only at properties it defines for every choice. | Add the property to the record for every choice, or read it with optional chaining where absence is intended. | `ads://guides/recipes` |
|
|
76
|
+
| `choice/part-ambiguous` | error | A part inside another part is read by its name, so the name belongs to one nested part of the recipe. | Give each nested part the owner reads its own name. | `ads://guides/recipes` |
|
|
75
77
|
| `choice/part-unknown` | error | A part is used only if the recipe spec declares it. | Declare the part in the recipe spec, or use one of the parts it already declares. | `ads://guides/recipes` |
|
|
76
78
|
| `choice/recipe-access-unsupported` | error | Recipe output is selected only through the variants and parts its spec declares. | Select recipe output only through the variants and parts its spec declares. | `ads://guides/recipes` |
|
|
77
79
|
| `construction/condition-unknown` | error | A part's `at` names a condition of the spatial profile its nearest recipe selects. | Select a spatial profile (a composite's `spatialProfile`) that declares the condition, or name one it declares. | `ads://guides/recipes`, `ads://guides/layout` |
|
|
@@ -188,7 +190,6 @@ Rendered markup does not match what its declaration promises. Make the markup ma
|
|
|
188
190
|
| `construction/layered-parts-missing` | error | A layered arrangement stacks at least two declared parts in one area. | Declare each layer as a part of the layered element, or use another layout. | `ads://guides/recipes`, `ads://guides/layout` |
|
|
189
191
|
| `construction/measured-placement-missing` | error | A popover with `placement: "measured"` is anchored by the owner: its root declares at least one measured inset or `translate`. | Declare the measured position on the recipe root (`measured: { x: { type: "length", property: "inset-inline-start" }, y: { … "inset-block-start" } }`), or pin the popover to a viewport `corner`. | `ads://guides/recipes` |
|
|
190
192
|
| `construction/outset-unsupported` | error | `outset` draws a decorative backdrop past its parent's box (a glow behind a card): it belongs on a part of a `layered` parent that holds no parts and no text. The parent's box and the layout around it do not change. | Make the parent `layout: "layered"` (root or a part's `recipe`) with the backdrop as its first part, and keep content in the other layers. | `ads://guides/recipes` |
|
|
191
|
-
| `construction/parts-visual-repeated` | error | A construction declares at most one visual part. | Declare a single visual part. | `ads://guides/recipes` |
|
|
192
193
|
| `construction/reserve-without-text` | error | `reserveLines` reserves lines of the part's own text profile, so the part has one. | Make the part a text part (with a text slot or `text` profile), or remove `reserveLines`. | `ads://guides/recipes` |
|
|
193
194
|
| `construction/scheme-unsupported` | error | `scheme` marks one file of a content image's light and dark pair: it belongs on a visual part rendered as an `<img>` without an artwork binding. Declared artwork selects its drawing by theme through its own variants. | Render the part as an `<img>` whose `src` the application supplies, or remove `scheme` and give the declared asset a variant for the other theme. | `ads://guides/recipes`, `ads://guides/branding` |
|
|
194
195
|
| `construction/snap-without-scroll` | error | Scroll snap is declared by the arrangement of the element that scrolls on the snap axis (`overflow: "scroll-inline"` for inline, `"scroll-block"` for block, `"scroll-both"` for both); its children, which it places, snap. Elsewhere it has no effect. | Make the element scroll on the snap axis with `overflow` (`scroll-inline`, `scroll-block` or `scroll-both`), or move `snap` to the arrangement of the element that scrolls. | `ads://guides/recipes`, `ads://guides/layout` |
|
|
@@ -218,7 +219,7 @@ Rendered markup does not match what its declaration promises. Make the markup ma
|
|
|
218
219
|
| `source/scheme-image-not-lazy` | error | In a light and dark image pair, the image of the scheme the default theme (the first declared) does not have is `loading="lazy"` in every choice: a hidden lazy image is not downloaded, an eager one is. Only the default scheme's image may load eagerly. | Write `loading="lazy"` on that image as a literal and apply any priority (eager loading, `fetchPriority`) to the default scheme's image only. | `ads://guides/recipes` |
|
|
219
220
|
| `source/scheme-image-size-missing` | error | Both images of a light and dark pair state `width` and `height`: each file's own pixel size, so the box is reserved before either loads and the page does not move when the theme changes. | Set `width` and `height` on both images from each file's own pixel size. | `ads://guides/recipes` |
|
|
220
221
|
| `source/summary-outside-details` | error | A declared summary is the first child of a `<details>` element: elsewhere it has no disclosure semantics. | Render the summary inside the owner's `<details>`, or declare another element. | `ads://guides/recipes`, `ads://guides/accessibility` |
|
|
221
|
-
| `source/visual-binding-count` | error | A
|
|
222
|
+
| `source/visual-binding-count` | error | A visual part binds exactly one declared asset. A control and standalone artwork have one visual part; a region may have several, each with its own binding. | Bind exactly one declared asset to each visual part; in a control or standalone artwork, declare one visual part. | `ads://guides/branding`, `ads://guides/pictograms` |
|
|
222
223
|
|
|
223
224
|
## accessibility-semantics
|
|
224
225
|
|
|
@@ -231,12 +232,14 @@ Owned markup or motion lacks required accessible semantics: a text alternative,
|
|
|
231
232
|
| `check/a11y-keyboard` | review | An onClick on a non-interactive element (div, span, li, img and similar) without role and tabIndex cannot be reached or used from the keyboard (WCAG 2.2 2.1.1), unless a delegated or wrapping control handles it. Composite-widget items and backdrops whose handler reads currentTarget are exempt. | Use a <button> for the action, or add role, tabIndex and a key handler to the element. | `ads://guides/accessibility` |
|
|
232
233
|
| `check/a11y-motion-endless` | info | A recipe root, a part or an artwork that plays a repeating sequence whenever it is rendered is noted: motion that starts by itself, runs longer than five seconds and is shown beside other content must be pausable, stoppable or hideable (WCAG 2.2 2.2.2), and the owner has no state to stop this one by. Reduced motion stops it only for users who set that preference. | Play the sequence under an owner state the user can end, or render the part only while the work it stands for is in progress. | `ads://guides/accessibility` |
|
|
233
234
|
| `check/component-contrast` | error | Text meets WCAG 2.2 AA (4.5:1, or 3:1 where its text profile is provably large) against the backdrop it is rendered on: the nearest opaque background of the elements and owners around it, across files, with translucent backgrounds and known gradients composited, in every theme, brand and condition context. A public component is also placed by applications on the document surface foundation.ads.ts declares. | Choose a surface for the text whose colour contrasts with the surface it is rendered on, render the component on another surface, use large text where 3:1 suffices, or adjust the token in the named context. | `ads://guides/accessibility`, `ads://guides/tokens` |
|
|
234
|
-
| `check/surface-contrast` | error | A surface profile that sets both color and background meets WCAG 2.2 AA for text, 4.5:1, in every context (theme, brand, brand under theme and condition); its background-image gradient stops count as backgrounds. The minimum follows what the colour paints where the profile is used: a pair below 4.5:1 is accepted when every use of the profile in the design system is artwork (a visual part, or a control that renders no text: 3:1, WCAG 1.4.11), large text (at least 24px, or 18.66px at weight 700: 3:1) or artwork hidden from assistive technology (decoration: no minimum). A profile nothing uses, one a slot supplies, the document surface, and one the recipe also names for a pseudo-element, a prose element, a backdrop or an entrance keep 4.5:1. | Adjust the colour or background token's value in the named context (or point the profile at a pair that contrasts), keeping the pair at 4.5:1 or more; a colour meant for artwork at 3:1 belongs to a surface profile that only visual parts or text-less controls select. | `ads://guides/accessibility`, `ads://guides/tokens` |
|
|
235
|
+
| `check/surface-contrast` | error | A surface profile that sets both color and background meets WCAG 2.2 AA for text, 4.5:1, in every context (theme, brand, brand under theme and condition); its background-image gradient stops count as backgrounds. The minimum follows what the colour paints where the profile is used: a pair below 4.5:1 is accepted when every use of the profile in the design system is artwork (a visual part, or a control that renders no text: 3:1, WCAG 1.4.11), large text (at least 24px, or 18.66px at weight 700: 3:1) or artwork hidden from assistive technology (decoration: no minimum). A profile nothing uses, one a slot supplies, the document surface, and one the recipe also names for a pseudo-element, a prose element, a backdrop or an entrance keep 4.5:1. | Adjust the colour or background token's value in the named context (or point the profile at a pair that contrasts), keeping the pair at 4.5:1 or more; a colour meant for artwork at 3:1 belongs to a surface profile that only visual parts or text-less controls select. A surface that paints a disabled element declares `state: "inactive"` among its fields: it has no minimum (WCAG 1.4.3 exempts inactive components) and may then be selected only under `:disabled` or `[aria-disabled="true"]`. | `ads://guides/accessibility`, `ads://guides/tokens` |
|
|
235
236
|
| `construction/accessibility-declaration-unmet` | error | An `accessibility` declaration is verified where ADS can: `"boundary-on-interaction"` needs a hover treatment of the control part whose border, drawn at the frame's width, reaches 3:1 against the surroundings in every context (the focus outline is held to 3:1 as always); `"visible-label"` needs a programmatically associated, rendered label (checked by the render audit). | Make the declared identification real (a hover border at 3:1, a visible associated label), or remove the declaration and give the control a 3:1 boundary or fill. | `ads://guides/recipes`, `ads://guides/accessibility` |
|
|
237
|
+
| `construction/artwork-paint-contrast-insufficient` | error | A control's artwork with paint slots stays recognizable on the control: in every theme, brand and state, at least one of its paints reaches 3:1 against the control's own background (WCAG 1.4.11). A drawing with its own colours (`paint: "intrinsic"`, a product's logo) is not checked. | Give the drawing one paint that reaches 3:1 on that background in that context (an outline or a darker fill), or adjust the token's value there. | `ads://guides/pictograms`, `ads://guides/accessibility`, `ads://guides/tokens` |
|
|
236
238
|
| `construction/inactive-surface-active` | error | A surface profile declaring `state: "inactive"` paints a disabled control: it has no contrast minimum (WCAG 2.2 1.4.3 exempts inactive components), so a construction selects it only under an inactive owner state (`:disabled`, `[aria-disabled="true"]`), never at rest or under another state. | Select it under `&:disabled` or `&[aria-disabled="true"]`, or use a surface without `state: "inactive"` (which is held to the contrast minimum). | `ads://guides/recipes`, `ads://guides/accessibility` |
|
|
237
239
|
| `construction/non-text-contrast-insufficient` | error | A control part inside a known surface keeps its boundary and focus visible (WCAG 2.2 1.4.11): where its own background does not reach 3:1 against the enclosing background, its border colour (base and each owner state) does; its focus outline colour reaches 3:1 against what it sits on (the enclosing background outside the box, its own inside), in every theme, brand and condition. | Choose a border or focus colour token that reaches 3:1 against the surrounding background in that context, or give the control a background that does. | `ads://guides/recipes`, `ads://guides/accessibility`, `ads://guides/tokens` |
|
|
238
240
|
| `construction/paint-contrast-insufficient` | error | Every declared value of a runtime paint keeps its contrast against the background the construction knows, in every theme, brand and owner state: a `color` paint 4.5:1 (3:1 for provably large text, WCAG 2.2 1.4.3); a `fill`, `stroke` or `border-color` paint, and a `background-color` paint against its enclosing background, 3:1 (1.4.11); text on a painted background its text minimum. The set is finite, so one failing value fails whichever value data selects. | Adjust that token's value in the failing context, remove it from the paint's values, or place the element on a background it contrasts with. | `ads://guides/recipes`, `ads://guides/accessibility`, `ads://guides/tokens` |
|
|
239
241
|
| `construction/placeholder-contrast-insufficient` | error | Placeholder text has at least 4.5:1 contrast against its part's background in every theme, brand and state (WCAG 1.4.3). | Choose a placeholder surface whose colour token contrasts enough with the part's background in that context, or adjust the token's value there. | `ads://guides/recipes`, `ads://guides/accessibility`, `ads://guides/tokens` |
|
|
242
|
+
| `construction/progress-contrast-insufficient` | error | A progress bar's fill has at least 3:1 contrast against its track, the part's own background, in every theme, brand and state (WCAG 1.4.11). | Choose a fill surface whose background token contrasts enough with the part's own background in that context, or adjust the token's value there. | `ads://guides/recipes`, `ads://guides/accessibility`, `ads://guides/tokens` |
|
|
240
243
|
| `construction/prose-contrast-insufficient` | error | Text in prose reaches the contrast minimum (WCAG 2.2 1.4.3: 4.5:1, or 3:1 for provably large text) on every surface it can sit on, in every theme and brand: each declared element's colour on the prose root's background and on the background of each declared element that can contain it (a link in a quote, text in a table cell or a code block), in its base and state surfaces. | Change the element's colour or the surface it sits on until the pair passes in every theme and brand; give an element inside a tinted container (a quote, a code block) its own colour there by tinting the container's surface, not by a one-off value. | `ads://guides/accessibility`, `ads://guides/recipes` |
|
|
241
244
|
| `construction/state-contrast-insufficient` | error | An element's owner states keep it readable (text 4.5:1 or 3:1 when large; a visual part's or a text-less control's artwork 3:1; artwork hidden from assistive technology has no minimum): where a state's colour meets a background from another surface profile (a colour-only state over the base fill, a state fill under the base colour), the pair has at least 4.5:1 contrast in every theme, brand and condition, or 3:1 where the element's text profile makes its text large there (at least 24px, or 18.66px at weight 700); a state that holds only while the element is inactive (:disabled, [aria-disabled="true"]) has no minimum (WCAG 2.2 1.4.3). Two states that cannot hold on one root together (two values of one attribute, a state and its :not(), :disabled and :enabled) are not paired. | Treat the state with a surface that sets both its colour and background, or choose colour and background tokens that contrast in that context. | `ads://guides/recipes`, `ads://guides/accessibility`, `ads://guides/tokens` |
|
|
242
245
|
| `construction/target-area-overlap` | error | The enlarged hit areas of neighbouring targets in a stack or inline arrangement do not overlap across their gap in any context: a press there would reach two targets (WCAG 2.2 2.5.8). | Widen the arrangement's gap to at least the hit areas' reach beyond the two boxes, or reduce the min-target sizes. | `ads://guides/recipes`, `ads://guides/accessibility` |
|
|
@@ -313,18 +316,18 @@ A value has the wrong kind, role or range for where it is used. Choose one of th
|
|
|
313
316
|
| `construction/grid-context-invalid` | error | A grid's algebra holds in every theme, brand and condition context, like contrast and target size: a context that changes a margin, gutter, maximum width or fixed track the grid reads must still leave content width, fluid space and cells wider than their gutter insets at every breakpoint. | Change the named context's token value so the grid fits there too, or the grid's columns, bound or placement. | `ads://guides/layout`, `ads://guides/tokens` |
|
|
314
317
|
| `construction/layer-clearance-unbounded` | error | A layer clears a block-start region by a fixed length: `clear-block-start` resolves to a px, rem or em layout size. | Give the cleared region a fixed block size token and clear by it, or declare `clear: "none"` and let the panel cover that region. | `ads://guides/recipes`, `ads://guides/tokens` |
|
|
315
318
|
| `construction/paint-transition-redundant` | error | A paint transition names only channels that change: each differs between the element's base surface and at least one of its state surfaces. | Remove the channel from `paintTransition.channels`, or give a state surface a different value for it. | `ads://guides/recipes` |
|
|
316
|
-
| `construction/paint-unsupported` | error | Artwork is painted only through channels its asset declares. | Use a paint channel the asset declares, or declare the channel on the asset. | `ads://guides/pictograms`, `ads://guides/contracts` |
|
|
317
319
|
| `construction/paint-value-role` | error | A runtime paint's values (and its fallback) are paint-role tokens: never a raw colour, a URL or a token of another role. | Declare the colour as a token in a `paint.ads.css` sheet (with its theme and brand values) and list that token. | `ads://guides/recipes`, `ads://guides/tokens` |
|
|
318
320
|
| `construction/profile-field-unsupported` | error | A profile field holds a value the construction can lower. | Use a value this construction can lower. | `ads://guides/recipes` |
|
|
319
321
|
| `construction/profile-kind` | error | A construction references a profile of the kind its field requires. | Reference a profile of the required kind. | `ads://guides/recipes` |
|
|
320
|
-
| `construction/pseudo-surface-unsupported` | error | A pseudo-element surface sets exactly one field
|
|
322
|
+
| `construction/pseudo-surface-unsupported` | error | A pseudo-element surface sets exactly one field: a placeholder's text colour (`color`), or a progress bar's fill (`background`). Other paints, borders and effects of a pseudo-element are not supported. | Treat the pseudo-element with a surface profile that sets only that field: `color` for a placeholder, `background` for a progress fill. | `ads://guides/recipes` |
|
|
321
323
|
| `construction/sequence-not-seamless` | error | A looping sequence ends where it starts: its step at 100 states the same values as its step at 0, so the loop has no jump. A sequence that should run forward then backward declares `repeat: "alternate"`; one that plays one time declares `repeat: "once"`. | Make the step at 100 state the values of the step at 0, or declare `repeat: "alternate"` or `repeat: "once"` in the profile. | `ads://guides/recipes` |
|
|
322
324
|
| `construction/sequence-stagger-missing` | error | A part's `order` starts it that many staggers after the first, so parts that share a sequence run in turn. The stagger is the sequence profile's `stagger` (role `duration`). | Give the sequence profile a `stagger` token, or remove `order` from the part. | `ads://guides/recipes` |
|
|
323
325
|
| `construction/sequence-step-field` | error | A step of a sequence states what the part looks like there: `opacity`, travel (`translateInline`, `translateBlock`), one scale (`scale`, or `scaleInline` or `scaleBlock` for one axis) and `rotate`, each from a token of its role. A step states at least one, and one scale. | State one of the step fields with a token of its role (opacity, motion-distance, motion-scale, motion-angle), and at most one scale per step. | `ads://guides/recipes` |
|
|
324
326
|
| `construction/sequence-steps-invalid` | error | A sequence profile has at least two steps, each at a distinct whole percentage of the run, from 0 to 100. | Give the sequence a step at 0 and a step at 100, and distinct whole percentages between them. | `ads://guides/recipes` |
|
|
325
327
|
| `construction/spatial-bound-unit` | error | A breakpoint or named condition bound is a media or container query bound and is authored in rem or em, which follow the reader's text size; ADS writes it as authored and never converts px. | Write the token in rem (divide the px value by 16). | `ads://guides/layout`, `ads://guides/tokens` |
|
|
328
|
+
| `construction/state-geometry-unsupported` | error | An owner state may select an element's geometry: another frame profile, another spacing profile, and whether a part is collapsed. The state's frame states every field the element's own frame writes; a listed geometry channel changes under some state; a `:hover` state has a focus or attribute state of the same geometry, so it is not for pointer users only; a collapsed part has no frame or arrangement of its own and sits in a stack or a row; a state's frame keeps the element's hit area; neighbouring targets do not overlap. | Give the element a frame before a state changes it; state every field in the state's frame profile; list only channels that change; repeat a hover state's geometry under `:focus-visible`, `:focus-within` or an attribute state; put a collapsible part's box on the one element it holds. | `ads://guides/recipes`, `ads://guides/layout` |
|
|
326
329
|
| `construction/state-text-field` | error | A text profile selected under an owner state (`when: { state: { text } }`) changes the weight and the tracking only (`font-weight`, `letter-spacing`): the family, the size, the line height and every other text property stay the element's own, so the state moves neither the line nor the box's height. | Derive the state's text profile from the element's own (`extends`) and change only `weight` or `letterSpacing`; a different size or family is a different element or a recipe choice, not a state. | `ads://guides/recipes` |
|
|
327
|
-
| `construction/surface-effect-misplaced` | error | A shadow that follows an element's shape is declared where it belongs. `shapeShadow` is a visual part's (an image, artwork, a glyph), which has nothing inside it. `groupShadow` is a container's choice: everything inside it casts one shadow. A surface declares at most one of them. `boxShadow` remains the shadow of an element's box and suits any rectangular or rounded element. A `mask` fades a drawing (a visual part) or the edge of an element that scrolls; on any other container its text would fade where it stands, and that cannot be proven readable. | On a visual part use `shapeShadow`; on a container use `boxShadow` for the shadow of its box, or `groupShadow` when one shadow for everything inside it is what you want. Put a `mask` on a visual part, or on an element whose `overflow` scrolls. Give each element its own surface profile where they differ. | `ads://guides/recipes`, `ads://guides/tokens` |
|
|
330
|
+
| `construction/surface-effect-misplaced` | error | A shadow that follows an element's shape is declared where it belongs. `shapeShadow` is a visual part's (an image, artwork, a glyph), which has nothing inside it. `groupShadow` is a container's choice: everything inside it casts one shadow. A surface declares at most one of them. `boxShadow` remains the shadow of an element's box and suits any rectangular or rounded element. A `mask` fades a drawing (a visual part) or the edge of an element that scrolls; on any other container its text would fade where it stands, and that cannot be proven readable. | On a visual part use `shapeShadow`; on a container use `boxShadow` for the shadow of its box, or `groupShadow` when one shadow for everything inside it is what you want. Put a `mask` on a visual part, or on an element whose `overflow` scrolls. Put `brightness` on a visual part (the picture itself). Give each element its own surface profile where they differ. | `ads://guides/recipes`, `ads://guides/tokens` |
|
|
328
331
|
| `construction/surface-shadow-layer` | error | A `shapeShadow` or `groupShadow` token is one shadow layer in every theme and brand: two offsets, an optional blur and a colour. `filter: drop-shadow()` takes no second layer, no spread and no `inset`, and `none` is not a shadow to cast; a shadow token with those is for `boxShadow`. | Give the field its own shadow token with one layer and no spread, in every theme and brand, or use `boxShadow` for this shadow. | `ads://guides/tokens`, `ads://guides/recipes` |
|
|
329
332
|
| `construction/vector-surface-unsupported` | error | A vector part's surface sets exactly one field, its stroke `color`. | Give the vector part a colour-only surface profile. | `ads://guides/recipes`, `ads://guides/pictograms` |
|
|
330
333
|
| `contexts/declaration-rejected` | error | foundation.ads.ts is one literal foundation() declaration the design language accepts. | Correct the foundation declaration as the message describes. | `ads://guides/tokens`, `ads://guides/recipes` |
|
|
@@ -393,6 +396,7 @@ Two definitions claim the same thing, or a definition depends on itself. Keep ex
|
|
|
393
396
|
| `registration/duplicate` | error | A token is registered once. | Keep one registration. | `ads://guides/tokens` |
|
|
394
397
|
| `registration/not-beside-token` | error | A token is registered in the file that defines it, so the definition and its registration change together. | Move the registration into the file that defines the token. | `ads://guides/tokens` |
|
|
395
398
|
| `rejection/redundant-design-declaration` | error | A declaration states only what its default or input does not already provide. | Remove the declaration. | `ads://guides/recipes` |
|
|
399
|
+
| `review/hover-geometry-shift` | review | Geometry an element in flow takes under `:hover` (another frame or spacing profile, a part that opens) moves what follows it whenever the pointer passes over it. ADS accepts it as the designer's choice and lists it for review; a layer of a layered parent draws over its neighbours instead and is not listed. | Keep it when the movement is wanted (a pile that spreads and pushes what follows). Otherwise draw the change over its neighbours: a layer of a layered parent, an outset backdrop, or a translate or scale effect, which move nothing else. | `ads://guides/recipes`, `ads://guides/layout` |
|
|
396
400
|
| `source/glyph-grid-mixed` | error | Every asset a reference binding can receive shares one grid (viewBox, optical center and minimum drawn height), so one construction draws them all. | Draw the glyphs on one viewBox with one optical center, or accept them through separate props or owners. | `ads://guides/pictograms` |
|
|
397
401
|
| `source/layer-modal-context` | error | A modal sheet's `modalQuery` is a viewport media query, so the owner's layout swaps at viewport tiers too: no grid of the same owner responds to a container. | Use `context: "viewport"` for the owner's grids, or keep the sheet modal at every size (no `modalBelow`). | `ads://guides/recipes`, `ads://guides/layout` |
|
|
398
402
|
| `source/local-name-collision` | error | Names of the form compiledClassN are reserved for ADS's emitted output. | Rename the local identifier. | `ads://guides/recipes` |
|
|
@@ -418,7 +422,7 @@ ADS cannot prove the rule holds; the design itself may be fine. Rewrite into a f
|
|
|
418
422
|
| `check/token-type-unresolved` | review | A token's value shape is proven statically in every context; a value ADS cannot read (calc() mixing units for a bounded role, an unknown function, currentColor, a context-only token unavailable here) is reviewed, never treated as checked. A nowhere-declared reference instead has the primary token-css/token-missing error. | Prefer a literal of the role's shape or an alias of one; when the expression is deliberate, check its value by hand in the named context. | `ads://guides/tokens` |
|
|
419
423
|
| `choice/binding-not-immutable` | error | Design is selected from const bindings, component props or the element of a `.map` over a literal array. | Use a const declaration initialized in place, a component prop, or the element of a `.map` over a literal array. | `ads://guides/recipes` |
|
|
420
424
|
| `choice/binding-written` | error | Values that select design are immutable after declaration, so one declaration describes every use. | Declare it with const and derive new values into new bindings instead of reassigning. | `ads://guides/recipes` |
|
|
421
|
-
| `choice/branch-limit` | error | Choice analysis is bounded; a selection must stay small enough to be checked completely. |
|
|
425
|
+
| `choice/branch-limit` | error | Choice analysis is bounded; a selection must stay small enough to be checked completely. | Every listed value multiplies the combinations checked. Make fewer of them select styling or markup together: replace conditional chains with one lookup over a const record keyed by the selecting value, merge props that always change together, or move a part with its own props into its own owner. | `ads://guides/recipes` |
|
|
422
426
|
| `choice/construction-limit` | error | An owner lowers a bounded number of distinct constructions. | Collapse equivalent combinations, or move independent variation into separate parts so constructions do not multiply. | `ads://guides/recipes`, `ads://guides/performance` |
|
|
423
427
|
| `choice/domain-not-finite` | error | Design is selected from a finite set of choices ADS can enumerate, so every rendered combination can be checked. | Type the selecting prop or variable as a literal union (or a const record key) so every choice can be enumerated. An optional object, callback or node prop selects by whether it is given: test a node (or any type that admits text, a number or a boolean) with `!== undefined`, never by truthiness. | `ads://guides/recipes`, `ads://guides/atomic-styles` |
|
|
424
428
|
| `choice/evidence-not-local` | error | Design evidence comes from the owner's source or the design system's own modules. | Bring the value into the owner's source as a const or prop, or import it from the design system's own modules. | `ads://guides/recipes`, `ads://guides/layers` |
|
|
@@ -430,6 +434,7 @@ ADS cannot prove the rule holds; the design itself may be fine. Rewrite into a f
|
|
|
430
434
|
| `choice/work-limit` | error | Choice analysis is bounded; a selection must stay small enough to be checked completely. | Reduce how many independent axes combine in one class expression; split the selection into smaller recipes or parts. | `ads://guides/recipes` |
|
|
431
435
|
| `construction/drawn-height-unevaluable` | error | Artwork size resolves to a fixed length at the reference root, so its minimum drawn height can be checked. | Size the artwork with tokens that resolve to fixed lengths at the reference root. | `ads://guides/branding`, `ads://guides/pictograms` |
|
|
432
436
|
| `construction/placeholder-contrast-unresolved` | error | Placeholder contrast is proven from tokens: the placeholder colour and the part's own background resolve to opaque colours in every theme, brand and state. | Give the part a surface with an opaque background colour token, and a placeholder colour that resolves to a colour token in every context. | `ads://guides/recipes`, `ads://guides/accessibility`, `ads://guides/tokens` |
|
|
437
|
+
| `construction/progress-contrast-unresolved` | error | A progress bar's contrast is proven from tokens: the fill and the track resolve to opaque colours in every theme, brand and state. | Give the part a surface with an opaque background colour token for its track, and the fill a surface whose background resolves to a colour token in every context. | `ads://guides/recipes`, `ads://guides/accessibility`, `ads://guides/tokens` |
|
|
433
438
|
| `discovery/export-star` | error | The public barrel names each public owner; `export *` hides which owners are public. | Replace `export *` with named re-exports of each public owner. | `ads://guides/contracts` |
|
|
434
439
|
| `mock/dynamic-dependency` | error | A mock's code is static: no `import()`, `require`, `eval`, `Function` or tagged templates. | Import statically and pass plain values as props. | `ads://guides/scenarios` |
|
|
435
440
|
| `mock/spread-props` | error | A mock passes explicit props: a spread could carry design ADS cannot see. | Pass each prop explicitly. | `ads://guides/scenarios` |
|
|
@@ -514,8 +519,11 @@ Required evidence is absent or belongs to another revision. Run the named check
|
|
|
514
519
|
| `check/generated-stale` | info | The emitted output folder's ads-contract.json records the source revision it was emitted from; while that is not the design system's current revision, the output is out of date. Never blocking: with compile.emitOnAccept false it is intended until the next emit. | Run `ads emit` to refresh the output folder from the current source. | `ads://guides/layers` |
|
|
515
520
|
| `check/owner-analysis-blocked` | info | An owner whose analysis needs another owner's public rows (a grid's alignRows on that owner's component) is analyzed only after that owner analyzes: rows of a failed owner are unknown, so ADS does not guess them. | Fix the owner-analysis error of the owner the finding names in blockedBy and check again; the blocked owner is then analyzed. Do not change the blocked owner for this note. | `ads://guides/validation` |
|
|
516
521
|
| `check/palette-generated` | error | foundation.ads.ts declares the generated palette module (`palette: true`) exactly when the design system keeps palette.generated.ts, and a declared module matches what ADS derives from the token sheets' paint tokens and the declared themes and brands; it is never edited by hand. | Run `ads sync` to create or regenerate a declared module (editing directly), or accept the change through a draft, which does it in the candidate; for a module present without the declaration, add `palette: true` to the foundation or delete the file. Change the token sheets or foundation.ads.ts, never the module. | `ads://guides/tokens` |
|
|
522
|
+
| `check/render-audit-construction-unrendered` | review | The audit measures every owner state a construction declares on the elements the scenarios render (`derived` in the audit's coverage). A construction with states that no audited scenario renders is listed by owner and classes: what its states do once laid out is unmeasured. | Render that variant in a scenario of its owner (or of a pattern that holds it), with the props that select it; its states are then measured without anything more. | `ads://guides/accessibility`, `ads://guides/validation` |
|
|
517
523
|
| `check/render-audit-nothing-measured` | review | A render assigned overlay or control targets measures at least one of them; when every attempt to open or hover failed (gone, timeout, detached, failed), that render's interactive states are unverified. | Make the scenario's controls stable while it renders (no unmounting, covering or re-rendering of triggers) and run the audit again. | `ads://guides/accessibility` |
|
|
518
524
|
| `check/render-audit-skipped` | info | The audit opens overlays and hovers/focuses controls to measure their states; targets it could not reach are listed by reason, and their states are unmeasured rather than passed. | Usually none; if a target matters, make it reachable in the scenario (an aria-haspopup trigger that opens a dialog/menu/listbox and closes on Escape, a page that settles within 5 s) or split a scenario that exceeds the 3-overlay/6-control limit. | `ads://guides/accessibility` |
|
|
525
|
+
| `check/render-audit-state-derivable` | info | A scenario state that only shows an attribute state of an owner rendered elsewhere is measured by the audit without it: the audit derives the state from the recipe. | Usually none. Remove the scenario state when it exists only for the audit and nobody needs to see it in the showcase; keep it when the component renders other content in that state. | `ads://guides/validation` |
|
|
526
|
+
| `check/render-audit-state-forced` | review | The audit measures an attribute state by setting the attribute. Where owner analysis proves that the prop which sets that attribute also changes the owner's markup, the audit measured the state's CSS over the content at rest: what the component really shows in that state is unmeasured until a scenario renders it. | Add a scenario specimen or state that renders the owner with that prop set; the item clears when a render shows the state for real. | `ads://guides/accessibility`, `ads://guides/validation` |
|
|
519
527
|
| `check/test-registration` | error | A behaviour spec (a `*.behavior.spec.*` file, or a test file tagging a case `@ads:<case>`) is named by its owner's behaviour registration: ADS runs a spec's cases only as registered checks. | Register the spec's cases as checks in the owner's <Owner>.ads.behavior.ts, or remove the spec (or its @ads: tags). | `ads://guides/behaviors` |
|
|
520
528
|
| `check/validation-inputs` | error | A validation result is current only when ADS can re-read its inputs after the run and match the captured revision; failing to read them leaves the result unestablished. | Fix the error the message names (usually configuration or a declared validation.inputs path), then validate again. | `ads://guides/validation` |
|
|
521
529
|
| `check/validation-previews` | error | Validation requires a current verified production preview for every registered scenario; a successful build command alone is not enough. | Wait for the named scenario's preview to become current (ads_status.build), then validate again. | `ads://guides/validation`, `ads://guides/runtimes` |
|
package/docs/TOKEN-ROLES.md
CHANGED
|
@@ -27,7 +27,7 @@ construction and owner code supplies behavior: these are different contracts.
|
|
|
27
27
|
- Primitive and semantic describe a token's purpose, not role kinds. A folder
|
|
28
28
|
name does not prove primitive status. The example design system uses
|
|
29
29
|
`Foundation/spacing.ads.css` for primitive scale steps and functional groups
|
|
30
|
-
(`Surfaces/` for paints, gradients, shadows, opacity, blur and
|
|
30
|
+
(`Surfaces/` for paints, gradients, shadows, opacity, blur, saturation and brightness) for semantic
|
|
31
31
|
decisions.
|
|
32
32
|
- A primitive must not depend on a semantic consumer. Semantic tokens compose
|
|
33
33
|
primitives and other semantic tokens through the
|
|
@@ -83,6 +83,9 @@ construction and owner code supplies behavior: these are different contracts.
|
|
|
83
83
|
| `opacity.ads.css` | Number in [0, 1] | Surface/effect opacity and declared motion endpoints | `--surface-translucency` |
|
|
84
84
|
| `blur.ads.css` | Nonnegative length | Surface filter/backdrop blur radius | `--surface-backdrop-blur` |
|
|
85
85
|
| `saturation.ads.css` | Nonnegative percentage; `100%` leaves colours unchanged, `0%` is greyscale | A surface's `backdropSaturate`: how vivid what is behind it appears | `--surface-backdrop-saturation` |
|
|
86
|
+
| `brightness.ads.css` | Nonnegative percentage; `100%` leaves the drawing unchanged, lower dims it, `0%` is black | A surface's `brightness` on a visual part: a picture with no dark version, dimmed in the dark theme | `--image-brightness` |
|
|
87
|
+
| `overlap.ads.css` | Nonnegative length | A spacing profile's `overlap`: how far the neighbours of an `inline` or `stack` arrangement overlap, in place of a gap | `--facepile-overlap` |
|
|
88
|
+
| `box-share.ads.css` | Nonnegative percentage of an element's own box on one axis | A spacing profile's `outsetBlock` / `outsetInline`: how far a layered backdrop is drawn past its box, growing with it | `--glow-outset-block` |
|
|
86
89
|
|
|
87
90
|
- A gradient is not an arbitrary CSS image: asset URLs belong to asset
|
|
88
91
|
declarations.
|
|
@@ -186,6 +189,9 @@ zoom and 320 px reflow).
|
|
|
186
189
|
| `visual-size` | `rem` for icons beside text; `px` for pictures | An icon belongs to its label's size; a picture must still fit a narrow region when text is enlarged |
|
|
187
190
|
| `border-width`, `focus-offset`, `blur` | `px` | A hairline should stay a hairline |
|
|
188
191
|
| `saturation` | `%` (`100%` unchanged, `0%` greyscale, above `100%` more vivid) | It scales colour, not length |
|
|
192
|
+
| `brightness` | `%` (`100%` unchanged, below dims) | It scales light, not length |
|
|
193
|
+
| `overlap` | `px` or `rem` | It is a share of a neighbour, sized like the neighbour |
|
|
194
|
+
| `box-share` | `%` of the box on that axis | It grows with the box it is a share of |
|
|
189
195
|
| `radius` | `px`, or `%` for a pill or circle | A corner belongs to the box, not to its text |
|
|
190
196
|
| `frame-size` | `rem`, `%`, or a viewport unit for a full-height frame | It depends on what the frame must fit |
|
|
191
197
|
| `layout-size` | `rem` for breakpoints and named condition bounds (enforced); `px` or `rem` for fixed tracks and maximum widths | A breakpoint is a media or container query bound, written as authored: in `rem` it follows the reader's text size, so larger text gets the narrower layout sooner. A `px` bound is an error (`spatial-profile-invalid` for a breakpoint, `construction/spatial-bound-unit` for a condition), never converted |
|