@atom63/styles 0.1.0-beta.7 → 0.1.0-beta.8
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/README.md +5 -2
- package/generated/atom63.figma-sync.json +5303 -3801
- package/generated/atom63.tokens.json +7298 -4304
- package/package.json +3 -3
- package/src/compat/a63-from-shadcn.css +5 -1
- package/src/compat/shadcn.css +15 -1
- package/src/contracts/choice.css +1 -1
- package/src/contracts/choice.tokens.json +1 -1
- package/src/contracts/control.css +14 -8
- package/src/contracts/control.tokens.json +57 -8
- package/src/contracts/environment.css +134 -12
- package/src/contracts/environment.resolver.json +664 -23
- package/src/contracts/field.css +1 -1
- package/src/contracts/field.tokens.json +1 -1
- package/src/contracts/selection.css +2 -0
- package/src/contracts/selection.tokens.json +5 -0
- package/src/contracts/surface.css +4 -0
- package/src/contracts/surface.tokens.json +57 -0
- package/src/tailwind/roles.json +19 -2
- package/src/tailwind/theme.css +104 -2
- package/src/tailwind/utilities.css +17 -0
- package/src/themes/aqua.css +1 -0
- package/src/themes/aqua.resolver.json +6 -0
- package/src/themes/retro.css +1 -0
- package/src/themes/retro.resolver.json +6 -0
- package/src/themes/terminal.css +8 -0
- package/src/themes/terminal.resolver.json +37 -0
- package/src/tokens/brand-action.css +4 -0
- package/src/tokens/brand-action.resolver.json +18 -0
- package/src/tokens/contrast.browser.test.ts +40 -16
- package/src/tokens/density.browser.test.ts +167 -0
- package/src/tokens/form-factor.browser.test.ts +129 -0
- package/src/tokens/foundation/primitives.css +0 -30
- package/src/tokens/foundation/primitives.tokens.json +0 -212
- package/src/tokens/foundation/radius.css +5 -0
- package/src/tokens/foundation/radius.tokens.json +8 -0
- package/src/tokens/foundation/typography.css +24 -0
- package/src/tokens/foundation/typography.native.css +12 -2
- package/src/tokens/foundation/typography.resolver.json +72 -0
- package/src/tokens/index.css +1 -0
- package/src/tokens/personalization-axes.browser.test.ts +13 -0
- package/src/tokens/semantics.css +104 -5
- package/src/tokens/semantics.resolver.json +253 -11
- package/src/tokens/surface.css +8 -0
- package/src/tokens/surface.resolver.json +49 -0
- package/src/tokens/type-roles.css +75 -0
- package/src/tokens/type-roles.resolver.json +366 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atom63/styles",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.8",
|
|
4
4
|
"description": "CSS tokens, themes, contracts, and utilities for the Atom63 design system",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -108,8 +108,8 @@
|
|
|
108
108
|
"devDependencies": {
|
|
109
109
|
"@vitest/browser": "4.1.11",
|
|
110
110
|
"@vitest/browser-playwright": "4.1.11",
|
|
111
|
-
"eslint": "10.
|
|
112
|
-
"playwright": "1.
|
|
111
|
+
"eslint": "10.14.0",
|
|
112
|
+
"playwright": "1.65.0",
|
|
113
113
|
"vitest": "4.1.11",
|
|
114
114
|
"@atom63/eslint-config": "0.1.0"
|
|
115
115
|
},
|
|
@@ -18,12 +18,15 @@
|
|
|
18
18
|
--a63-surface-panel: var(--card);
|
|
19
19
|
--a63-surface-overlay: var(--popover);
|
|
20
20
|
--a63-surface-muted: var(--muted);
|
|
21
|
+
--a63-surface-sidebar: var(--sidebar, var(--muted));
|
|
21
22
|
--a63-surface-control: var(--background);
|
|
22
23
|
--a63-surface-control-hover: var(--accent);
|
|
23
24
|
--a63-text-primary: var(--foreground);
|
|
24
25
|
--a63-text-secondary: var(--muted-foreground);
|
|
26
|
+
--a63-text-tertiary: var(--muted-foreground);
|
|
25
27
|
--a63-border-subtle: var(--border);
|
|
26
28
|
--a63-border-control: var(--input);
|
|
29
|
+
--a63-border-input: var(--input);
|
|
27
30
|
|
|
28
31
|
/* ── Action / status ─────────────────────────────────────────────────── */
|
|
29
32
|
--a63-action-primary: var(--primary);
|
|
@@ -42,7 +45,8 @@
|
|
|
42
45
|
--a63-status-warning-foreground: white;
|
|
43
46
|
|
|
44
47
|
--a63-scrim: color-mix(in oklch, black 40%, transparent);
|
|
45
|
-
/*
|
|
48
|
+
/* Shadow, media and on-media colors hold in every theme; same values as semantics.css. */
|
|
49
|
+
--a63-shadow-color: rgb(0 0 0);
|
|
46
50
|
--a63-media-stage: rgb(0 0 0);
|
|
47
51
|
--a63-media-scrim: rgb(0 0 0 / 0.7);
|
|
48
52
|
--a63-on-media-foreground: rgb(255 255 255);
|
package/src/compat/shadcn.css
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
|
|
33
33
|
/* Borders and focus */
|
|
34
34
|
--border: var(--a63-border-subtle);
|
|
35
|
-
--input: var(--a63-border-
|
|
35
|
+
--input: var(--a63-border-input);
|
|
36
36
|
--ring: var(--a63-focus-ring);
|
|
37
37
|
|
|
38
38
|
/* Actions */
|
|
@@ -62,6 +62,8 @@
|
|
|
62
62
|
/* Selection */
|
|
63
63
|
--selected: var(--a63-selected-background);
|
|
64
64
|
--selected-foreground: var(--a63-selected-foreground);
|
|
65
|
+
--selected-accent: var(--a63-selected-accent-background);
|
|
66
|
+
--selected-accent-foreground: var(--a63-selected-accent-foreground);
|
|
65
67
|
|
|
66
68
|
/* Charts */
|
|
67
69
|
--chart-1: var(--a63-chart-1);
|
|
@@ -138,6 +140,18 @@
|
|
|
138
140
|
--category-stone-subtle: var(--a63-category-stone-subtle);
|
|
139
141
|
--category-stone-subtle-foreground: var(--a63-category-stone-subtle-foreground);
|
|
140
142
|
|
|
143
|
+
/* Media */
|
|
144
|
+
--media-stage: var(--a63-media-stage);
|
|
145
|
+
--media-surface: var(--a63-media-surface);
|
|
146
|
+
--media-scrim: var(--a63-media-scrim);
|
|
147
|
+
--on-media-foreground: var(--a63-on-media-foreground);
|
|
148
|
+
--on-media-surface: var(--a63-on-media-surface);
|
|
149
|
+
--on-media-surface-strong: var(--a63-on-media-surface-strong);
|
|
150
|
+
--on-media-border: var(--a63-on-media-border);
|
|
151
|
+
--on-media-ring: var(--a63-on-media-ring);
|
|
152
|
+
--on-media-veil: var(--a63-on-media-veil);
|
|
153
|
+
--on-media-veil-strong: var(--a63-on-media-veil-strong);
|
|
154
|
+
|
|
141
155
|
/* Sidebar */
|
|
142
156
|
--sidebar: var(--a63-surface-sidebar);
|
|
143
157
|
--sidebar-foreground: var(--a63-text-primary);
|
package/src/contracts/choice.css
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*
|
|
11
11
|
* Axis-dependent colour hooks are resolved at the recipe use-site:
|
|
12
12
|
* --a63-choice-accent -> var(--a63-action-primary)
|
|
13
|
-
* --a63-choice-border -> var(--a63-border-
|
|
13
|
+
* --a63-choice-border -> var(--a63-border-input)
|
|
14
14
|
* --a63-choice-track-off -> var(--a63-surface-control)
|
|
15
15
|
* --a63-choice-focus-ring -> var(--a63-focus-ring)
|
|
16
16
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$description": "Choice contract — form controls that expose checked/selected value state.\n\nCovers Checkbox, Radio, and Switch. This is the visual home for indicators,\ndots, thumbs, and on/off tracks. It aliases the older `selection` namespace so\ncurrent recipes keep working while new recipes can use the clearer name.\n\nAxis-dependent colour hooks are resolved at the recipe use-site:\n --a63-choice-accent -> var(--a63-action-primary)\n --a63-choice-border -> var(--a63-border-
|
|
2
|
+
"$description": "Choice contract — form controls that expose checked/selected value state.\n\nCovers Checkbox, Radio, and Switch. This is the visual home for indicators,\ndots, thumbs, and on/off tracks. It aliases the older `selection` namespace so\ncurrent recipes keep working while new recipes can use the clearer name.\n\nAxis-dependent colour hooks are resolved at the recipe use-site:\n --a63-choice-accent -> var(--a63-action-primary)\n --a63-choice-border -> var(--a63-border-input)\n --a63-choice-track-off -> var(--a63-surface-control)\n --a63-choice-focus-ring -> var(--a63-focus-ring)\n\nMaterial hooks are axis-independent defaults. Themes override them to express\nglass, bevel, or phosphor treatment without making choice controls inherit the\nfull Button chrome. Switch maps the box shadows to its track and the indicator\ngloss to its checked fill; Checkbox and Radio use the same hooks on their\nboxes and indicators.",
|
|
3
3
|
"a63": {
|
|
4
4
|
"choice": {
|
|
5
5
|
"thumb": {
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
:root {
|
|
15
15
|
/* Height ramp (xs..xl) — web defaults (desktop density: 24/28/32/36/40, to
|
|
16
16
|
match production @atom63/ui). iOS overrides in environment.css. */
|
|
17
|
-
--a63-control-height-xs: calc(var(--a63-space-unit) * 6);
|
|
18
|
-
--a63-control-height-sm: calc(var(--a63-space-unit) * 7);
|
|
19
|
-
--a63-control-height-md: calc(var(--a63-space-unit) * 8);
|
|
20
|
-
--a63-control-height-lg: calc(var(--a63-space-unit) * 9);
|
|
21
|
-
--a63-control-height-xl: calc(var(--a63-space-unit) * 10);
|
|
17
|
+
--a63-control-height-xs: round(nearest, calc(var(--a63-space-unit) * 6), 1px);
|
|
18
|
+
--a63-control-height-sm: round(nearest, calc(var(--a63-space-unit) * 7), 1px);
|
|
19
|
+
--a63-control-height-md: round(nearest, calc(var(--a63-space-unit) * 8), 1px);
|
|
20
|
+
--a63-control-height-lg: round(nearest, calc(var(--a63-space-unit) * 9), 1px);
|
|
21
|
+
--a63-control-height-xl: round(nearest, calc(var(--a63-space-unit) * 10), 1px);
|
|
22
22
|
/* Recipes resolve rendered size at their own use-site:
|
|
23
23
|
max(calc(height * density), size-appropriate min-SIZE)
|
|
24
24
|
Do not cache that formula in a :root custom property. Input, density, and
|
|
@@ -59,6 +59,12 @@
|
|
|
59
59
|
--a63-control-icon-size-md: 1rem;
|
|
60
60
|
--a63-control-icon-size-lg: 1.125rem;
|
|
61
61
|
--a63-control-icon-size-xl: 1.25rem;
|
|
62
|
+
/* The glyph of an icon-only control (24/14, 28/16, 32/18, 36/20, 40/22): about 0.56 of the box, where an icon beside a label keeps the size ramp above. The iOS design language and the phone form factor already draw that ramp at these values on their taller boxes, so they need no override. */
|
|
63
|
+
--a63-control-icon-only-size-xs: 0.875rem;
|
|
64
|
+
--a63-control-icon-only-size-sm: 1rem;
|
|
65
|
+
--a63-control-icon-only-size-md: 1.125rem;
|
|
66
|
+
--a63-control-icon-only-size-lg: 1.25rem;
|
|
67
|
+
--a63-control-icon-only-size-xl: 1.375rem;
|
|
62
68
|
--a63-control-gap: var(--a63-space-2);
|
|
63
69
|
--a63-control-radius: var(--a63-radius-control);
|
|
64
70
|
--a63-control-border-width: 1px;
|
|
@@ -87,7 +93,7 @@
|
|
|
87
93
|
than in the recipe
|
|
88
94
|
because the design-language axis has to retune it (contracts/environment.css)
|
|
89
95
|
and axes own tokens; recipes only read them. */
|
|
90
|
-
--a63-row-padding-block-xs: var(--a63-space-2);
|
|
91
|
-
--a63-row-padding-block-sm: var(--a63-space-3);
|
|
92
|
-
--a63-row-padding-block-md: var(--a63-space-4);
|
|
96
|
+
--a63-row-padding-block-xs: round(nearest, var(--a63-space-2), 1px);
|
|
97
|
+
--a63-row-padding-block-sm: round(nearest, var(--a63-space-3), 1px);
|
|
98
|
+
--a63-row-padding-block-md: round(nearest, var(--a63-space-4), 1px);
|
|
93
99
|
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"$type": "dimension",
|
|
8
8
|
"$value": "{a63.space.unit}",
|
|
9
9
|
"$extensions": {
|
|
10
|
-
"io.atom63.derive": "calc({a63.space.unit} * 6)"
|
|
10
|
+
"io.atom63.derive": "round(nearest, calc({a63.space.unit} * 6), 1px)"
|
|
11
11
|
},
|
|
12
12
|
"$description": "Height ramp (xs..xl) — web defaults (desktop density: 24/28/32/36/40, to\n match production @atom63/ui). iOS overrides in environment.css."
|
|
13
13
|
},
|
|
@@ -15,28 +15,28 @@
|
|
|
15
15
|
"$type": "dimension",
|
|
16
16
|
"$value": "{a63.space.unit}",
|
|
17
17
|
"$extensions": {
|
|
18
|
-
"io.atom63.derive": "calc({a63.space.unit} * 7)"
|
|
18
|
+
"io.atom63.derive": "round(nearest, calc({a63.space.unit} * 7), 1px)"
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
21
|
"md": {
|
|
22
22
|
"$type": "dimension",
|
|
23
23
|
"$value": "{a63.space.unit}",
|
|
24
24
|
"$extensions": {
|
|
25
|
-
"io.atom63.derive": "calc({a63.space.unit} * 8)"
|
|
25
|
+
"io.atom63.derive": "round(nearest, calc({a63.space.unit} * 8), 1px)"
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"lg": {
|
|
29
29
|
"$type": "dimension",
|
|
30
30
|
"$value": "{a63.space.unit}",
|
|
31
31
|
"$extensions": {
|
|
32
|
-
"io.atom63.derive": "calc({a63.space.unit} * 9)"
|
|
32
|
+
"io.atom63.derive": "round(nearest, calc({a63.space.unit} * 9), 1px)"
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
"xl": {
|
|
36
36
|
"$type": "dimension",
|
|
37
37
|
"$value": "{a63.space.unit}",
|
|
38
38
|
"$extensions": {
|
|
39
|
-
"io.atom63.derive": "calc({a63.space.unit} * 10)"
|
|
39
|
+
"io.atom63.derive": "round(nearest, calc({a63.space.unit} * 10), 1px)"
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
},
|
|
@@ -145,6 +145,46 @@
|
|
|
145
145
|
"unit": "rem"
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
|
+
},
|
|
149
|
+
"only": {
|
|
150
|
+
"size": {
|
|
151
|
+
"xs": {
|
|
152
|
+
"$type": "dimension",
|
|
153
|
+
"$value": {
|
|
154
|
+
"value": 0.875,
|
|
155
|
+
"unit": "rem"
|
|
156
|
+
},
|
|
157
|
+
"$description": "The glyph of an icon-only control (24/14, 28/16, 32/18, 36/20, 40/22): about 0.56 of the box, where an icon beside a label keeps the size ramp above. The iOS design language and the phone form factor already draw that ramp at these values on their taller boxes, so they need no override."
|
|
158
|
+
},
|
|
159
|
+
"sm": {
|
|
160
|
+
"$type": "dimension",
|
|
161
|
+
"$value": {
|
|
162
|
+
"value": 1,
|
|
163
|
+
"unit": "rem"
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
"md": {
|
|
167
|
+
"$type": "dimension",
|
|
168
|
+
"$value": {
|
|
169
|
+
"value": 1.125,
|
|
170
|
+
"unit": "rem"
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
"lg": {
|
|
174
|
+
"$type": "dimension",
|
|
175
|
+
"$value": {
|
|
176
|
+
"value": 1.25,
|
|
177
|
+
"unit": "rem"
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
"xl": {
|
|
181
|
+
"$type": "dimension",
|
|
182
|
+
"$value": {
|
|
183
|
+
"value": 1.375,
|
|
184
|
+
"unit": "rem"
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
148
188
|
}
|
|
149
189
|
},
|
|
150
190
|
"gap": {
|
|
@@ -223,15 +263,24 @@
|
|
|
223
263
|
"xs": {
|
|
224
264
|
"$type": "dimension",
|
|
225
265
|
"$value": "{a63.space.2}",
|
|
226
|
-
"$description": "Row block padding. Rows (Item today; Menu/Command rows are the intended\n next tenants) take their height from content + this padding, floored by the\n control ramp, so a single-line row lands on ~44pt and a two-line row on\n ~59pt. Those targets come from our own measurement of shipping iOS apps\n (docs/design-system/web-ios-token-parity.md) — Apple publishes no iOS row\n height, so do not cite UIKit cell metrics for them. It lives here rather\n than in the recipe\n because the design-language axis has to retune it (contracts/environment.css)\n and axes own tokens; recipes only read them."
|
|
266
|
+
"$description": "Row block padding. Rows (Item today; Menu/Command rows are the intended\n next tenants) take their height from content + this padding, floored by the\n control ramp, so a single-line row lands on ~44pt and a two-line row on\n ~59pt. Those targets come from our own measurement of shipping iOS apps\n (docs/design-system/web-ios-token-parity.md) — Apple publishes no iOS row\n height, so do not cite UIKit cell metrics for them. It lives here rather\n than in the recipe\n because the design-language axis has to retune it (contracts/environment.css)\n and axes own tokens; recipes only read them.",
|
|
267
|
+
"$extensions": {
|
|
268
|
+
"io.atom63.derive": "round(nearest, {a63.space.2}, 1px)"
|
|
269
|
+
}
|
|
227
270
|
},
|
|
228
271
|
"sm": {
|
|
229
272
|
"$type": "dimension",
|
|
230
|
-
"$value": "{a63.space.3}"
|
|
273
|
+
"$value": "{a63.space.3}",
|
|
274
|
+
"$extensions": {
|
|
275
|
+
"io.atom63.derive": "round(nearest, {a63.space.3}, 1px)"
|
|
276
|
+
}
|
|
231
277
|
},
|
|
232
278
|
"md": {
|
|
233
279
|
"$type": "dimension",
|
|
234
|
-
"$value": "{a63.space.4}"
|
|
280
|
+
"$value": "{a63.space.4}",
|
|
281
|
+
"$extensions": {
|
|
282
|
+
"io.atom63.derive": "round(nearest, {a63.space.4}, 1px)"
|
|
283
|
+
}
|
|
235
284
|
}
|
|
236
285
|
}
|
|
237
286
|
}
|
|
@@ -16,7 +16,11 @@
|
|
|
16
16
|
* Prevent focus zoom in mobile Safari without inflating non-editable control
|
|
17
17
|
* labels. Editable recipes combine this floor with their normal type token.
|
|
18
18
|
*
|
|
19
|
-
* Density — proportional rhythm
|
|
19
|
+
* Density — proportional rhythm. A density scope sets --a63-space-unit, and every :root token
|
|
20
|
+
* built on it (the space steps, control heights and paddings, row padding, gaps) is declared
|
|
21
|
+
* again on [data-a63-density], so a nested scope recomputes them once, the same as the root.
|
|
22
|
+
* The design-language and phone scopes are also declared on a density scope inside them, so
|
|
23
|
+
* it keeps their sizes.
|
|
20
24
|
*
|
|
21
25
|
* Auto-detect coarse pointers. Without this, touch ergonomics only apply when an
|
|
22
26
|
* app explicitly passes `input` to UIProvider — an opt-in almost nothing does, so
|
|
@@ -31,10 +35,16 @@
|
|
|
31
35
|
* Design language — component sizing/proportions + interaction feedback only.
|
|
32
36
|
* The base :root (control.css) is the web default; iOS overrides sizing + feel.
|
|
33
37
|
* No radius, color, or touch-target here.
|
|
38
|
+
*
|
|
39
|
+
* Form factor — a phone screen. [data-a63-form-factor='phone'] sets the type steps and the
|
|
40
|
+
* control sizing of a phone (iOS text sizes: body 17, subheadline 15, footnote 13). Viewport
|
|
41
|
+
* width does not apply it; a phone layout stamps it (AppView layout="phone"). The type roles
|
|
42
|
+
* are redeclared on the same scope (type-roles.css), so text-body and the other roles follow it.
|
|
34
43
|
*/
|
|
35
44
|
@import './environment.native.css';
|
|
36
45
|
|
|
37
46
|
:root {
|
|
47
|
+
/* An extra multiplier recipes apply to control heights. It stays 1 in every density: density reaches sizes through --a63-space-unit, which the control heights are built on, so scaling them again would shrink controls twice. */
|
|
38
48
|
--a63-density-scale: 1;
|
|
39
49
|
--a63-editable-font-size-min: 0px;
|
|
40
50
|
/* Two different numbers, deliberately separate:
|
|
@@ -73,15 +83,48 @@
|
|
|
73
83
|
}
|
|
74
84
|
|
|
75
85
|
:is([data-a63-density='compact'], [data-density='compact']) {
|
|
76
|
-
--a63-density-scale: 0.9;
|
|
77
86
|
--a63-space-unit: calc(var(--spacing-1) * 0.875);
|
|
78
87
|
}
|
|
79
88
|
|
|
80
89
|
:is([data-a63-density='comfortable'], [data-density='comfortable']) {
|
|
81
|
-
--a63-density-scale: 1;
|
|
82
90
|
--a63-space-unit: var(--spacing-1);
|
|
83
91
|
}
|
|
84
92
|
|
|
93
|
+
:is([data-a63-density], [data-density]) {
|
|
94
|
+
--a63-space-1: var(--a63-space-unit);
|
|
95
|
+
--a63-space-2: calc(var(--a63-space-unit) * 2);
|
|
96
|
+
--a63-space-3: calc(var(--a63-space-unit) * 3);
|
|
97
|
+
--a63-space-4: calc(var(--a63-space-unit) * 4);
|
|
98
|
+
--a63-space-5: calc(var(--a63-space-unit) * 5);
|
|
99
|
+
--a63-space-6: calc(var(--a63-space-unit) * 6);
|
|
100
|
+
--a63-space-0_5: calc(var(--a63-space-unit) * 0.5);
|
|
101
|
+
--a63-space-1_5: calc(var(--a63-space-unit) * 1.5);
|
|
102
|
+
--a63-space-2_5: calc(var(--a63-space-unit) * 2.5);
|
|
103
|
+
--a63-space-3_5: calc(var(--a63-space-unit) * 3.5);
|
|
104
|
+
--a63-action-control-gap: var(--a63-control-gap);
|
|
105
|
+
--a63-control-height-xs: round(nearest, calc(var(--a63-space-unit) * 6), 1px);
|
|
106
|
+
--a63-control-height-sm: round(nearest, calc(var(--a63-space-unit) * 7), 1px);
|
|
107
|
+
--a63-control-height-md: round(nearest, calc(var(--a63-space-unit) * 8), 1px);
|
|
108
|
+
--a63-control-height-lg: round(nearest, calc(var(--a63-space-unit) * 9), 1px);
|
|
109
|
+
--a63-control-height-xl: round(nearest, calc(var(--a63-space-unit) * 10), 1px);
|
|
110
|
+
--a63-control-padding-inline-xs: var(--a63-space-2);
|
|
111
|
+
--a63-control-padding-inline-sm: var(--a63-space-2_5);
|
|
112
|
+
--a63-control-padding-inline-md: var(--a63-space-3);
|
|
113
|
+
--a63-control-padding-inline-lg: var(--a63-space-3_5);
|
|
114
|
+
--a63-control-padding-inline-xl: var(--a63-space-4);
|
|
115
|
+
--a63-control-gap: var(--a63-space-2);
|
|
116
|
+
--a63-row-padding-block-xs: round(nearest, var(--a63-space-2), 1px);
|
|
117
|
+
--a63-row-padding-block-sm: round(nearest, var(--a63-space-3), 1px);
|
|
118
|
+
--a63-row-padding-block-md: round(nearest, var(--a63-space-4), 1px);
|
|
119
|
+
--a63-menu-popup-padding: var(--a63-space-1);
|
|
120
|
+
--a63-menu-item-padding-block: var(--a63-space-1_5);
|
|
121
|
+
--a63-menu-item-padding-inline: var(--a63-space-2);
|
|
122
|
+
--a63-menu-item-gap: var(--a63-space-2);
|
|
123
|
+
--a63-menu-gap: var(--a63-space-0_5);
|
|
124
|
+
--a63-toggle-gap: var(--a63-control-gap);
|
|
125
|
+
--a63-trigger-gap: var(--a63-control-gap);
|
|
126
|
+
}
|
|
127
|
+
|
|
85
128
|
@media (pointer: coarse) {
|
|
86
129
|
:root {
|
|
87
130
|
--a63-control-min-size: 2rem;
|
|
@@ -119,12 +162,14 @@
|
|
|
119
162
|
--a63-row-min-size: var(--a63-control-min-size);
|
|
120
163
|
}
|
|
121
164
|
|
|
122
|
-
:is([data-a63-design-language='ios'], [data-design-language='ios'])
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
--a63-control-height-
|
|
126
|
-
--a63-control-height-
|
|
127
|
-
--a63-control-height-
|
|
165
|
+
:is([data-a63-design-language='ios'], [data-design-language='ios']),
|
|
166
|
+
:is([data-a63-design-language='ios'], [data-design-language='ios'])
|
|
167
|
+
:is([data-a63-density], [data-density]) {
|
|
168
|
+
--a63-control-height-xs: round(nearest, calc(var(--a63-space-unit) * 9), 1px);
|
|
169
|
+
--a63-control-height-sm: round(nearest, calc(var(--a63-space-unit) * 10), 1px);
|
|
170
|
+
--a63-control-height-md: round(nearest, calc(var(--a63-space-unit) * 11), 1px);
|
|
171
|
+
--a63-control-height-lg: round(nearest, calc(var(--a63-space-unit) * 12), 1px);
|
|
172
|
+
--a63-control-height-xl: round(nearest, calc(var(--a63-space-unit) * 13), 1px);
|
|
128
173
|
--a63-control-padding-inline-xs: var(--a63-space-3);
|
|
129
174
|
--a63-control-padding-inline-sm: var(--a63-space-3_5);
|
|
130
175
|
--a63-control-padding-inline-md: var(--a63-space-4);
|
|
@@ -146,9 +191,86 @@
|
|
|
146
191
|
so a single-line row lands on 44pt and a two-line row on ~59pt, instead of
|
|
147
192
|
52pt and 75pt. Targets are from our measurement study, not a published
|
|
148
193
|
Apple row height — there isn't one. */
|
|
149
|
-
--a63-row-padding-block-xs: var(--a63-space-1);
|
|
150
|
-
--a63-row-padding-block-sm: var(--a63-space-1_5);
|
|
151
|
-
--a63-row-padding-block-md: var(--a63-space-2);
|
|
194
|
+
--a63-row-padding-block-xs: round(nearest, var(--a63-space-1), 1px);
|
|
195
|
+
--a63-row-padding-block-sm: round(nearest, var(--a63-space-1_5), 1px);
|
|
196
|
+
--a63-row-padding-block-md: round(nearest, var(--a63-space-2), 1px);
|
|
152
197
|
/* Larger, iconic iOS pill switch (web default is 1rem in selection.css). */
|
|
153
198
|
--a63-switch-thumb-size: 1.375rem;
|
|
154
199
|
}
|
|
200
|
+
|
|
201
|
+
[data-a63-form-factor='phone'],
|
|
202
|
+
[data-a63-form-factor='phone'] :is([data-a63-density], [data-density]) {
|
|
203
|
+
/* The type steps of a phone screen, after the iOS text styles at the default Dynamic Type size:
|
|
204
|
+
body 17 (base), subheadline 15 (sm), footnote 13 (xs), caption2 11 (2xs), title3 20 (2xl),
|
|
205
|
+
title2 22 (3xl), title1 28 (5xl), largeTitle 34 (6xl). Steps without an iOS style keep the
|
|
206
|
+
scale in order. Complete, so the phone scope wins over the viewport and window steps. */
|
|
207
|
+
--typography-2xs-font-size: calc(11px * var(--typography-scale, 1));
|
|
208
|
+
--typography-2xs-line-height: calc(13px * var(--typography-scale, 1));
|
|
209
|
+
--typography-xs-font-size: calc(13px * var(--typography-scale, 1));
|
|
210
|
+
--typography-xs-line-height: calc(18px * var(--typography-scale, 1));
|
|
211
|
+
--typography-sm-font-size: calc(15px * var(--typography-scale, 1));
|
|
212
|
+
--typography-sm-line-height: calc(20px * var(--typography-scale, 1));
|
|
213
|
+
--typography-base-font-size: calc(17px * var(--typography-scale, 1));
|
|
214
|
+
--typography-base-line-height: calc(22px * var(--typography-scale, 1));
|
|
215
|
+
--typography-lg-font-size: calc(18px * var(--typography-scale, 1));
|
|
216
|
+
--typography-lg-line-height: calc(24px * var(--typography-scale, 1));
|
|
217
|
+
--typography-xl-font-size: calc(19px * var(--typography-scale, 1));
|
|
218
|
+
--typography-xl-line-height: calc(24px * var(--typography-scale, 1));
|
|
219
|
+
--typography-2xl-font-size: calc(20px * var(--typography-scale, 1));
|
|
220
|
+
--typography-2xl-line-height: calc(25px * var(--typography-scale, 1));
|
|
221
|
+
--typography-3xl-font-size: calc(22px * var(--typography-scale, 1));
|
|
222
|
+
--typography-3xl-line-height: calc(28px * var(--typography-scale, 1));
|
|
223
|
+
--typography-4xl-font-size: calc(25px * var(--typography-scale, 1));
|
|
224
|
+
--typography-4xl-line-height: calc(31px * var(--typography-scale, 1));
|
|
225
|
+
--typography-5xl-font-size: calc(28px * var(--typography-scale, 1));
|
|
226
|
+
--typography-5xl-line-height: calc(34px * var(--typography-scale, 1));
|
|
227
|
+
--typography-6xl-font-size: calc(34px * var(--typography-scale, 1));
|
|
228
|
+
--typography-6xl-line-height: calc(41px * var(--typography-scale, 1));
|
|
229
|
+
--typography-7xl-font-size: calc(36px * var(--typography-scale, 1));
|
|
230
|
+
--typography-7xl-line-height: calc(44px * var(--typography-scale, 1));
|
|
231
|
+
--typography-8xl-font-size: calc(39px * var(--typography-scale, 1));
|
|
232
|
+
--typography-8xl-line-height: calc(49px * var(--typography-scale, 1));
|
|
233
|
+
--typography-9xl-font-size: calc(44px * var(--typography-scale, 1));
|
|
234
|
+
--typography-9xl-line-height: calc(55px * var(--typography-scale, 1));
|
|
235
|
+
--typography-10xl-font-size: calc(40px * var(--typography-scale, 1));
|
|
236
|
+
--typography-10xl-line-height: calc(44px * var(--typography-scale, 1));
|
|
237
|
+
--typography-11xl-font-size: calc(56px * var(--typography-scale, 1));
|
|
238
|
+
--typography-11xl-line-height: calc(60px * var(--typography-scale, 1));
|
|
239
|
+
/* Controls on a phone: the iOS height ramp (36/40/44/48/52), and every standard control label
|
|
240
|
+
at body size (17), as iOS sets buttons, rows, fields and menus. xs stays at footnote size
|
|
241
|
+
for badges, shortcuts and initials. Weight and press feedback stay with the design language. */
|
|
242
|
+
--a63-control-height-xs: round(nearest, calc(var(--a63-space-unit) * 9), 1px);
|
|
243
|
+
--a63-control-height-sm: round(nearest, calc(var(--a63-space-unit) * 10), 1px);
|
|
244
|
+
--a63-control-height-md: round(nearest, calc(var(--a63-space-unit) * 11), 1px);
|
|
245
|
+
--a63-control-height-lg: round(nearest, calc(var(--a63-space-unit) * 12), 1px);
|
|
246
|
+
--a63-control-height-xl: round(nearest, calc(var(--a63-space-unit) * 13), 1px);
|
|
247
|
+
--a63-control-padding-inline-xs: var(--a63-space-3);
|
|
248
|
+
--a63-control-padding-inline-sm: var(--a63-space-3_5);
|
|
249
|
+
--a63-control-padding-inline-md: var(--a63-space-4);
|
|
250
|
+
--a63-control-padding-inline-lg: var(--a63-space-5);
|
|
251
|
+
--a63-control-padding-inline-xl: var(--a63-space-6);
|
|
252
|
+
--a63-control-font-size-xs: var(--typography-xs-font-size);
|
|
253
|
+
--a63-control-font-size-sm: var(--typography-base-font-size);
|
|
254
|
+
--a63-control-font-size-md: var(--typography-base-font-size);
|
|
255
|
+
--a63-control-font-size-lg: var(--typography-base-font-size);
|
|
256
|
+
--a63-control-font-size-xl: var(--typography-lg-font-size);
|
|
257
|
+
/* The secondary line under a title or label (an Item, Field or Form description, a Frame or
|
|
258
|
+
ConnectedPanel description): subheadline size (15), so it stays below the 17px title. Declared
|
|
259
|
+
only here; recipes fall back to --a63-control-font-size-sm, so other scopes are unchanged. */
|
|
260
|
+
--a63-control-font-size-secondary: var(--typography-sm-font-size);
|
|
261
|
+
--a63-control-icon-size-xs: 0.875rem;
|
|
262
|
+
--a63-control-icon-size-sm: 1rem;
|
|
263
|
+
--a63-control-icon-size-md: 1.125rem;
|
|
264
|
+
--a63-control-icon-size-lg: 1.25rem;
|
|
265
|
+
--a63-control-icon-size-xl: 1.375rem;
|
|
266
|
+
--a63-row-padding-block-xs: round(nearest, var(--a63-space-1), 1px);
|
|
267
|
+
--a63-row-padding-block-sm: round(nearest, var(--a63-space-1_5), 1px);
|
|
268
|
+
--a63-row-padding-block-md: round(nearest, var(--a63-space-2), 1px);
|
|
269
|
+
/* The switch of a phone (iOS 26): a 22px-tall pill knob 1.6 times as wide, on a track of about 63 by 28, as measured on a 3x iPhone screenshot. The height matches the iOS design language; the wide thumb is the phone's own. */
|
|
270
|
+
--a63-switch-thumb-size: 1.375rem;
|
|
271
|
+
--a63-switch-thumb-aspect: 1.6;
|
|
272
|
+
/* The row of a phone's grouped list (ItemGroup variant="inset", default and sm rows): 52px tall, as iOS 26 Settings and a 3x reference capture both measure (51-52pt). Declared only here; the Item recipe falls back to its control-height floor elsewhere. */
|
|
273
|
+
--a63-inset-row-min-size: round(nearest, calc(var(--a63-space-unit) * 13), 1px);
|
|
274
|
+
/* The corner of a phone's grouped-list card (ItemGroup variant="inset"): the 2xl step (18px at defaults), after a 3x reference capture that fits a 19pt corner. Follows the radius axis. Declared only here; the Item recipe falls back to --radius-lg elsewhere. */
|
|
275
|
+
--a63-inset-group-radius: var(--radius-2xl);
|
|
276
|
+
}
|