@atom63/styles 0.1.0-beta.1 → 0.1.0-beta.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.
- package/LICENSE +21 -0
- package/README.md +22 -13
- package/generated/atom63.figma-sync.json +23277 -0
- package/generated/atom63.tokens.json +19650 -8403
- package/generated/z-layers.d.ts +33 -0
- package/generated/z-layers.js +31 -0
- package/package.json +29 -15
- package/src/compat/a63-from-shadcn.css +281 -0
- package/src/compat/shadcn.browser.test.ts +23 -0
- package/src/compat/shadcn.css +133 -17
- package/src/contracts/action.css +4 -3
- package/src/contracts/action.native.css +11 -0
- package/src/contracts/action.tokens.json +66 -0
- package/src/contracts/badge.css +128 -58
- package/src/contracts/badge.resolver.json +454 -0
- package/src/contracts/choice.css +5 -2
- package/src/contracts/choice.native.css +9 -0
- package/src/contracts/choice.tokens.json +66 -0
- package/src/contracts/control.css +54 -57
- package/src/contracts/control.native.css +13 -0
- package/src/contracts/control.tokens.json +294 -0
- package/src/contracts/environment.css +178 -60
- package/src/contracts/environment.native.css +23 -0
- package/src/contracts/environment.resolver.json +1210 -0
- package/src/contracts/field.css +4 -2
- package/src/contracts/field.tokens.json +40 -0
- package/src/contracts/marker.css +6 -4
- package/src/contracts/marker.tokens.json +15 -0
- package/src/contracts/menu.css +25 -61
- package/src/contracts/menu.native.css +10 -0
- package/src/contracts/menu.resolver.json +122 -0
- package/src/contracts/overlay.css +11 -13
- package/src/contracts/overlay.native.css +13 -0
- package/src/contracts/overlay.tokens.json +103 -0
- package/src/contracts/segment.css +22 -68
- package/src/contracts/segment.tokens.json +19 -0
- package/src/contracts/selection.css +5 -1
- package/src/contracts/selection.tokens.json +42 -0
- package/src/contracts/skeleton.css +18 -2
- package/src/contracts/skeleton.resolver.json +62 -0
- package/src/contracts/surface.css +17 -24
- package/src/contracts/surface.native.css +17 -0
- package/src/contracts/surface.tokens.json +154 -0
- package/src/contracts/toggle.css +27 -3
- package/src/contracts/toggle.resolver.json +129 -0
- package/src/contracts/track.css +3 -1
- package/src/contracts/track.tokens.json +39 -0
- package/src/contracts/trigger.css +5 -2
- package/src/contracts/trigger.native.css +9 -0
- package/src/contracts/trigger.tokens.json +58 -0
- package/src/contracts/widget.css +76 -51
- package/src/contracts/widget.native.css +23 -0
- package/src/contracts/widget.resolver.json +1110 -0
- package/src/tailwind/roles.json +189 -0
- package/src/tailwind/theme.css +216 -24
- package/src/tailwind/utilities.css +17 -0
- package/src/themes/aqua.css +126 -89
- package/src/themes/aqua.native.css +80 -0
- package/src/themes/aqua.resolver.json +1304 -0
- package/src/themes/modern.css +10 -14
- package/src/themes/modern.native.css +16 -0
- package/src/themes/modern.resolver.json +350 -0
- package/src/themes/retro.css +22 -26
- package/src/themes/retro.native.css +16 -0
- package/src/themes/retro.resolver.json +794 -0
- package/src/themes/terminal.css +164 -41
- package/src/themes/terminal.native.css +22 -0
- package/src/themes/terminal.resolver.json +585 -0
- package/src/tokens/brand-action.css +65 -0
- package/src/tokens/brand-action.resolver.json +155 -0
- package/src/tokens/brand-ramp.css +108 -0
- package/src/tokens/brand-ramp.resolver.json +418 -0
- package/src/tokens/brand.css +6 -146
- package/src/tokens/chart-palette.browser.test.ts +188 -0
- package/src/tokens/color-mix-space.browser.test.ts +101 -0
- package/src/tokens/contrast.browser.test.ts +303 -5
- package/src/tokens/density.browser.test.ts +167 -0
- package/src/tokens/figma-parity.browser.test.ts +270 -0
- package/src/tokens/font.css +12 -0
- package/src/tokens/font.resolver.json +128 -0
- package/src/tokens/form-factor.browser.test.ts +129 -0
- package/src/tokens/foundation/effects.css +13 -13
- package/src/tokens/foundation/effects.resolver.json +433 -0
- package/src/tokens/foundation/fonts.css +11 -5
- package/src/tokens/foundation/fonts.tokens.json +45 -0
- package/src/tokens/foundation/motion.css +3 -0
- package/src/tokens/foundation/motion.tokens.json +53 -0
- package/src/tokens/foundation/palette.css +3 -0
- package/src/tokens/foundation/palette.tokens.json +1743 -0
- package/src/tokens/foundation/primitives.css +20 -43
- package/src/tokens/foundation/primitives.tokens.json +3258 -0
- package/src/tokens/foundation/radius.css +11 -9
- package/src/tokens/foundation/radius.tokens.json +108 -0
- package/src/tokens/foundation/typography.css +49 -12
- package/src/tokens/foundation/typography.native.css +21 -0
- package/src/tokens/foundation/typography.resolver.json +1008 -0
- package/src/tokens/foundation.css +0 -1
- package/src/tokens/index.css +1 -0
- package/src/tokens/motion.css +3 -1
- package/src/tokens/motion.resolver.json +135 -0
- package/src/tokens/native-values.json +38 -0
- package/src/tokens/personalization-axes.browser.test.ts +18 -3
- package/src/tokens/plate-scope.browser.test.ts +73 -0
- package/src/tokens/radius.css +12 -8
- package/src/tokens/radius.resolver.json +138 -0
- package/src/tokens/semantics.css +716 -41
- package/src/tokens/semantics.resolver.json +1639 -0
- package/src/tokens/space.css +8 -6
- package/src/tokens/space.tokens.json +78 -0
- package/src/tokens/surface.css +13 -19
- package/src/tokens/surface.resolver.json +706 -0
- package/src/tokens/swift-parity.browser.test.ts +141 -0
- package/src/tokens/type-roles.css +88 -0
- package/src/tokens/type-roles.resolver.json +419 -0
- package/src/tokens/type-scale.css +6 -0
- package/src/tokens/type-scale.resolver.json +67 -0
- package/generated/atom63.figma-tokens.json +0 -21664
- package/src/tokens/foundation/aliases.css +0 -28
- package/src/z-layers.ts +0 -40
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
|
+
* Generated from src/tokens/foundation/radius.tokens.json by scripts/build-css-from-dtcg.mjs. Do not edit;
|
|
3
|
+
* change the DTCG source and run `pnpm --filter @atom63/styles generate:tokens`.
|
|
4
|
+
*
|
|
2
5
|
* Radius foundation.
|
|
3
6
|
*
|
|
4
7
|
* The anchor (--corner-radius) and --radius-multiplier drive a derived scale.
|
|
@@ -9,28 +12,27 @@
|
|
|
9
12
|
:root {
|
|
10
13
|
--corner-radius: 10px;
|
|
11
14
|
--radius-multiplier: 1;
|
|
12
|
-
|
|
13
15
|
/* Tailwind default: `rounded` class (matches md) */
|
|
14
16
|
--radius: calc(var(--corner-radius) * 0.8 * var(--radius-multiplier));
|
|
15
|
-
|
|
16
17
|
/* Lower scale */
|
|
17
18
|
--radius-2xs: calc(var(--corner-radius) * 0.2 * var(--radius-multiplier));
|
|
18
19
|
--radius-xs: calc(var(--corner-radius) * 0.4 * var(--radius-multiplier));
|
|
19
20
|
--radius-sm: calc(var(--corner-radius) * 0.6 * var(--radius-multiplier));
|
|
20
21
|
--radius-md: calc(var(--corner-radius) * 0.8 * var(--radius-multiplier));
|
|
21
|
-
|
|
22
22
|
/* The anchor */
|
|
23
23
|
--radius-lg: calc(var(--corner-radius) * var(--radius-multiplier));
|
|
24
|
-
|
|
25
24
|
/* Upper scale */
|
|
26
25
|
--radius-xl: calc(var(--corner-radius) * 1.4 * var(--radius-multiplier));
|
|
27
26
|
--radius-2xl: calc(var(--corner-radius) * 1.8 * var(--radius-multiplier));
|
|
28
27
|
--radius-3xl: calc(var(--corner-radius) * 2.2 * var(--radius-multiplier));
|
|
29
28
|
--radius-4xl: calc(var(--corner-radius) * 2.6 * var(--radius-multiplier));
|
|
30
|
-
/*
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
* pill that ignores subtle/none/round wrap.
|
|
34
|
-
*/
|
|
29
|
+
/* Soft “full” = 2× md (already includes the multiplier). Stays on the same
|
|
30
|
+
personalization curve as the rest of the scale instead of a fixed 9999px
|
|
31
|
+
pill that ignores subtle/none/round wrap. */
|
|
35
32
|
--radius-full: calc(var(--radius-xl) * 2);
|
|
33
|
+
/* True pill: a fixed 9999px that makes any box a circle or capsule at any size
|
|
34
|
+
and on every radius axis value. Use it where a component promises a circle
|
|
35
|
+
or pill (round buttons, avatars, switches, radios, dots); use --radius-full
|
|
36
|
+
for a large corner that follows the radius axis. */
|
|
37
|
+
--radius-pill: 9999px;
|
|
36
38
|
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$description": "Radius foundation.\n\nThe anchor (--corner-radius) and --radius-multiplier drive a derived scale.\nThese are plain custom properties so the default, Tailwind-free build owns a\ncomplete radius scale; the Tailwind adapter (tailwind/theme.css) only\nre-exposes them as theme values, matching every other token category.",
|
|
3
|
+
"corner": {
|
|
4
|
+
"radius": {
|
|
5
|
+
"$type": "dimension",
|
|
6
|
+
"$value": {
|
|
7
|
+
"value": 10,
|
|
8
|
+
"unit": "px"
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"radius": {
|
|
13
|
+
"multiplier": {
|
|
14
|
+
"$type": "number",
|
|
15
|
+
"$value": 1
|
|
16
|
+
},
|
|
17
|
+
"$root": {
|
|
18
|
+
"$type": "dimension",
|
|
19
|
+
"$value": "{corner.radius}",
|
|
20
|
+
"$extensions": {
|
|
21
|
+
"io.atom63.derive": "calc({corner.radius} * 0.8 * {radius.multiplier})"
|
|
22
|
+
},
|
|
23
|
+
"$description": "Tailwind default: `rounded` class (matches md)"
|
|
24
|
+
},
|
|
25
|
+
"2xs": {
|
|
26
|
+
"$type": "dimension",
|
|
27
|
+
"$value": "{corner.radius}",
|
|
28
|
+
"$extensions": {
|
|
29
|
+
"io.atom63.derive": "calc({corner.radius} * 0.2 * {radius.multiplier})"
|
|
30
|
+
},
|
|
31
|
+
"$description": "Lower scale"
|
|
32
|
+
},
|
|
33
|
+
"xs": {
|
|
34
|
+
"$type": "dimension",
|
|
35
|
+
"$value": "{corner.radius}",
|
|
36
|
+
"$extensions": {
|
|
37
|
+
"io.atom63.derive": "calc({corner.radius} * 0.4 * {radius.multiplier})"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"sm": {
|
|
41
|
+
"$type": "dimension",
|
|
42
|
+
"$value": "{corner.radius}",
|
|
43
|
+
"$extensions": {
|
|
44
|
+
"io.atom63.derive": "calc({corner.radius} * 0.6 * {radius.multiplier})"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"md": {
|
|
48
|
+
"$type": "dimension",
|
|
49
|
+
"$value": "{corner.radius}",
|
|
50
|
+
"$extensions": {
|
|
51
|
+
"io.atom63.derive": "calc({corner.radius} * 0.8 * {radius.multiplier})"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"lg": {
|
|
55
|
+
"$type": "dimension",
|
|
56
|
+
"$value": "{corner.radius}",
|
|
57
|
+
"$extensions": {
|
|
58
|
+
"io.atom63.derive": "calc({corner.radius} * {radius.multiplier})"
|
|
59
|
+
},
|
|
60
|
+
"$description": "The anchor"
|
|
61
|
+
},
|
|
62
|
+
"xl": {
|
|
63
|
+
"$type": "dimension",
|
|
64
|
+
"$value": "{corner.radius}",
|
|
65
|
+
"$extensions": {
|
|
66
|
+
"io.atom63.derive": "calc({corner.radius} * 1.4 * {radius.multiplier})"
|
|
67
|
+
},
|
|
68
|
+
"$description": "Upper scale"
|
|
69
|
+
},
|
|
70
|
+
"2xl": {
|
|
71
|
+
"$type": "dimension",
|
|
72
|
+
"$value": "{corner.radius}",
|
|
73
|
+
"$extensions": {
|
|
74
|
+
"io.atom63.derive": "calc({corner.radius} * 1.8 * {radius.multiplier})"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"3xl": {
|
|
78
|
+
"$type": "dimension",
|
|
79
|
+
"$value": "{corner.radius}",
|
|
80
|
+
"$extensions": {
|
|
81
|
+
"io.atom63.derive": "calc({corner.radius} * 2.2 * {radius.multiplier})"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"4xl": {
|
|
85
|
+
"$type": "dimension",
|
|
86
|
+
"$value": "{corner.radius}",
|
|
87
|
+
"$extensions": {
|
|
88
|
+
"io.atom63.derive": "calc({corner.radius} * 2.6 * {radius.multiplier})"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"full": {
|
|
92
|
+
"$type": "dimension",
|
|
93
|
+
"$value": "{radius.xl}",
|
|
94
|
+
"$extensions": {
|
|
95
|
+
"io.atom63.derive": "calc({radius.xl} * 2)"
|
|
96
|
+
},
|
|
97
|
+
"$description": "Soft “full” = 2× md (already includes the multiplier). Stays on the same\npersonalization curve as the rest of the scale instead of a fixed 9999px\npill that ignores subtle/none/round wrap."
|
|
98
|
+
},
|
|
99
|
+
"pill": {
|
|
100
|
+
"$type": "dimension",
|
|
101
|
+
"$value": {
|
|
102
|
+
"value": 9999,
|
|
103
|
+
"unit": "px"
|
|
104
|
+
},
|
|
105
|
+
"$description": "True pill: a fixed 9999px that makes any box a circle or capsule at any size\nand on every radius axis value. Use it where a component promises a circle\nor pill (round buttons, avatars, switches, radios, dots); use --radius-full\nfor a large corner that follows the radius axis."
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
@@ -1,6 +1,23 @@
|
|
|
1
|
-
/*
|
|
1
|
+
/*
|
|
2
|
+
* Generated from src/tokens/foundation/typography.resolver.json by scripts/build-css-from-dtcg.mjs. Do not edit;
|
|
3
|
+
* change the DTCG source and run `pnpm --filter @atom63/styles generate:tokens`.
|
|
4
|
+
*
|
|
5
|
+
* Typography — responsive type scale.
|
|
6
|
+
*
|
|
7
|
+
* Every size and line height is multiplied by --typography-scale (1 when unset;
|
|
8
|
+
* set by [data-a63-type-scale] and the .text-scale-* classes). The Viewport
|
|
9
|
+
* modifier holds the three steps: xs (the base values), sm (640px+ / tablet
|
|
10
|
+
* portrait) and md (768px+ / tablet landscape and up). Each step is written twice,
|
|
11
|
+
* from the same values: as a min-width @media breakpoint on :root that declares
|
|
12
|
+
* only what changes from the step before, and as a complete [data-window-size]
|
|
13
|
+
* rule (md also covers lg and xl) for windowed layouts. The window rules come
|
|
14
|
+
* last, so on an element that matches both, the window size wins.
|
|
15
|
+
*/
|
|
16
|
+
@import './typography.native.css';
|
|
2
17
|
|
|
3
18
|
:root {
|
|
19
|
+
--typography-2xs-font-size: calc(11px * var(--typography-scale, 1));
|
|
20
|
+
--typography-2xs-line-height: calc(13px * var(--typography-scale, 1));
|
|
4
21
|
--typography-xs-font-size: calc(12px * var(--typography-scale, 1));
|
|
5
22
|
--typography-xs-line-height: calc(18px * var(--typography-scale, 1));
|
|
6
23
|
--typography-sm-font-size: calc(13px * var(--typography-scale, 1));
|
|
@@ -27,9 +44,12 @@
|
|
|
27
44
|
--typography-8xl-line-height: calc(44px * var(--typography-scale, 1));
|
|
28
45
|
--typography-9xl-font-size: calc(39px * var(--typography-scale, 1));
|
|
29
46
|
--typography-9xl-line-height: calc(49px * var(--typography-scale, 1));
|
|
47
|
+
--typography-10xl-font-size: calc(40px * var(--typography-scale, 1));
|
|
48
|
+
--typography-10xl-line-height: calc(44px * var(--typography-scale, 1));
|
|
49
|
+
--typography-11xl-font-size: calc(56px * var(--typography-scale, 1));
|
|
50
|
+
--typography-11xl-line-height: calc(60px * var(--typography-scale, 1));
|
|
30
51
|
}
|
|
31
52
|
|
|
32
|
-
/* Small (640px+ / tablet portrait) */
|
|
33
53
|
@media (min-width: 40rem) {
|
|
34
54
|
:root {
|
|
35
55
|
--typography-lg-font-size: calc(17px * var(--typography-scale, 1));
|
|
@@ -53,7 +73,6 @@
|
|
|
53
73
|
}
|
|
54
74
|
}
|
|
55
75
|
|
|
56
|
-
/* Medium (768px+ / tablet landscape) */
|
|
57
76
|
@media (min-width: 48rem) {
|
|
58
77
|
:root {
|
|
59
78
|
--typography-xl-font-size: calc(19px * var(--typography-scale, 1));
|
|
@@ -77,8 +96,9 @@
|
|
|
77
96
|
}
|
|
78
97
|
}
|
|
79
98
|
|
|
80
|
-
/* Window-responsive: Extra small (< 640px / mobile) */
|
|
81
99
|
[data-window-size='xs'] {
|
|
100
|
+
--typography-2xs-font-size: calc(11px * var(--typography-scale, 1));
|
|
101
|
+
--typography-2xs-line-height: calc(13px * var(--typography-scale, 1));
|
|
82
102
|
--typography-xs-font-size: calc(12px * var(--typography-scale, 1));
|
|
83
103
|
--typography-xs-line-height: calc(18px * var(--typography-scale, 1));
|
|
84
104
|
--typography-sm-font-size: calc(13px * var(--typography-scale, 1));
|
|
@@ -105,10 +125,15 @@
|
|
|
105
125
|
--typography-8xl-line-height: calc(44px * var(--typography-scale, 1));
|
|
106
126
|
--typography-9xl-font-size: calc(39px * var(--typography-scale, 1));
|
|
107
127
|
--typography-9xl-line-height: calc(49px * var(--typography-scale, 1));
|
|
128
|
+
--typography-10xl-font-size: calc(40px * var(--typography-scale, 1));
|
|
129
|
+
--typography-10xl-line-height: calc(44px * var(--typography-scale, 1));
|
|
130
|
+
--typography-11xl-font-size: calc(56px * var(--typography-scale, 1));
|
|
131
|
+
--typography-11xl-line-height: calc(60px * var(--typography-scale, 1));
|
|
108
132
|
}
|
|
109
133
|
|
|
110
|
-
/* Window-responsive: Small (640px+ / tablet portrait) */
|
|
111
134
|
[data-window-size='sm'] {
|
|
135
|
+
--typography-2xs-font-size: calc(11px * var(--typography-scale, 1));
|
|
136
|
+
--typography-2xs-line-height: calc(13px * var(--typography-scale, 1));
|
|
112
137
|
--typography-xs-font-size: calc(12px * var(--typography-scale, 1));
|
|
113
138
|
--typography-xs-line-height: calc(18px * var(--typography-scale, 1));
|
|
114
139
|
--typography-sm-font-size: calc(13px * var(--typography-scale, 1));
|
|
@@ -135,12 +160,17 @@
|
|
|
135
160
|
--typography-8xl-line-height: calc(49px * var(--typography-scale, 1));
|
|
136
161
|
--typography-9xl-font-size: calc(44px * var(--typography-scale, 1));
|
|
137
162
|
--typography-9xl-line-height: calc(55px * var(--typography-scale, 1));
|
|
163
|
+
--typography-10xl-font-size: calc(40px * var(--typography-scale, 1));
|
|
164
|
+
--typography-10xl-line-height: calc(44px * var(--typography-scale, 1));
|
|
165
|
+
--typography-11xl-font-size: calc(56px * var(--typography-scale, 1));
|
|
166
|
+
--typography-11xl-line-height: calc(60px * var(--typography-scale, 1));
|
|
138
167
|
}
|
|
139
168
|
|
|
140
|
-
/* Window-responsive: Medium (768px+ / tablet landscape) / Large (1024px+ / desktop) / Extra large (1280px+ / large desktop) */
|
|
141
169
|
[data-window-size='md'],
|
|
142
170
|
[data-window-size='lg'],
|
|
143
171
|
[data-window-size='xl'] {
|
|
172
|
+
--typography-2xs-font-size: calc(11px * var(--typography-scale, 1));
|
|
173
|
+
--typography-2xs-line-height: calc(13px * var(--typography-scale, 1));
|
|
144
174
|
--typography-xs-font-size: calc(12px * var(--typography-scale, 1));
|
|
145
175
|
--typography-xs-line-height: calc(18px * var(--typography-scale, 1));
|
|
146
176
|
--typography-sm-font-size: calc(13px * var(--typography-scale, 1));
|
|
@@ -167,24 +197,31 @@
|
|
|
167
197
|
--typography-8xl-line-height: calc(54px * var(--typography-scale, 1));
|
|
168
198
|
--typography-9xl-font-size: calc(49px * var(--typography-scale, 1));
|
|
169
199
|
--typography-9xl-line-height: calc(61px * var(--typography-scale, 1));
|
|
200
|
+
--typography-10xl-font-size: calc(40px * var(--typography-scale, 1));
|
|
201
|
+
--typography-10xl-line-height: calc(44px * var(--typography-scale, 1));
|
|
202
|
+
--typography-11xl-font-size: calc(56px * var(--typography-scale, 1));
|
|
203
|
+
--typography-11xl-line-height: calc(60px * var(--typography-scale, 1));
|
|
170
204
|
}
|
|
171
205
|
|
|
172
206
|
@layer base {
|
|
173
|
-
small {
|
|
174
|
-
font-size: var(--typography-xs-font-size);
|
|
175
|
-
line-height: var(--typography-xs-line-height);
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
/* Typography Scale Classes — set --typography-scale per subtree */
|
|
179
207
|
.text-scale-sm {
|
|
180
208
|
--typography-scale: 0.8;
|
|
181
209
|
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
@layer base {
|
|
182
213
|
.text-scale-normal {
|
|
183
214
|
--typography-scale: 1;
|
|
184
215
|
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
@layer base {
|
|
185
219
|
.text-scale-lg {
|
|
186
220
|
--typography-scale: 1.2;
|
|
187
221
|
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
@layer base {
|
|
188
225
|
.text-scale-xl {
|
|
189
226
|
--typography-scale: 1.4;
|
|
190
227
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Element styles that belong with the type scale but are not tokens: <small>
|
|
3
|
+
* uses the xs step, and text without a size class takes the body role. Kept
|
|
4
|
+
* next to typography.resolver.json, which generates the scale itself; see
|
|
5
|
+
* docs/design-system/token-single-source.md.
|
|
6
|
+
*/
|
|
7
|
+
@layer base {
|
|
8
|
+
small {
|
|
9
|
+
font-size: var(--typography-xs-font-size);
|
|
10
|
+
line-height: var(--typography-xs-line-height);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/* The body role (15/23 on the web, 17/22 on a phone), instead of the browser's
|
|
14
|
+
16px and a 1.5 line height. Set on body, not html, so 1rem stays 16px. A phone
|
|
15
|
+
scope redeclares the role, so it sets the size again for the text inside it. */
|
|
16
|
+
body,
|
|
17
|
+
[data-a63-form-factor] {
|
|
18
|
+
font-size: var(--a63-type-body-font-size);
|
|
19
|
+
line-height: var(--a63-type-body-line-height);
|
|
20
|
+
}
|
|
21
|
+
}
|