@nafisazizir/ziiz 0.1.0
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/CHANGELOG.md +27 -0
- package/LICENSE +21 -0
- package/README.md +58 -0
- package/dist/cn.d.ts +20 -0
- package/dist/cn.js +60 -0
- package/dist/cn.js.map +1 -0
- package/dist/shiki.d.ts +64 -0
- package/dist/shiki.js +115 -0
- package/dist/shiki.js.map +1 -0
- package/package.json +69 -0
- package/shadcn.css +73 -0
- package/theme.css +1400 -0
package/theme.css
ADDED
|
@@ -0,0 +1,1400 @@
|
|
|
1
|
+
/* ziiz design layer: ramp tokens, Tailwind theme mapping, base styles,
|
|
2
|
+
materials, type roles and the prose layer. Import-free on purpose (only
|
|
3
|
+
Tailwind directives and plain CSS), so a consuming app can pull in the whole
|
|
4
|
+
design system with a single `@import "@nafisazizir/ziiz/theme.css"` without
|
|
5
|
+
re-bundling Tailwind, animation presets or the shadcn slot bridge (that
|
|
6
|
+
lives in ./shadcn.css). */
|
|
7
|
+
|
|
8
|
+
@custom-variant dark (&:is(.dark *));
|
|
9
|
+
|
|
10
|
+
/* Font contract: the app sets --font-sans and --font-mono on html or :root
|
|
11
|
+
(next/font's variable class, or a plain declaration next to @font-face).
|
|
12
|
+
The type roles below only ever reference these two. Neither is redeclared
|
|
13
|
+
here, so an app that sets nothing falls back to Tailwind's default stacks
|
|
14
|
+
instead of a self-referencing variable and the browser's serif. */
|
|
15
|
+
@theme inline {
|
|
16
|
+
--font-heading: var(--font-sans);
|
|
17
|
+
|
|
18
|
+
/* Multiplicative radius scale off --radius; materials pin onto it. */
|
|
19
|
+
--radius-sm: calc(var(--radius) * 0.6);
|
|
20
|
+
--radius-md: calc(var(--radius) * 0.8);
|
|
21
|
+
--radius-lg: var(--radius);
|
|
22
|
+
--radius-xl: calc(var(--radius) * 1.4);
|
|
23
|
+
--radius-2xl: calc(var(--radius) * 1.8);
|
|
24
|
+
--radius-3xl: calc(var(--radius) * 2.2);
|
|
25
|
+
--radius-4xl: calc(var(--radius) * 2.6);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* ziiz theme tokens */
|
|
29
|
+
@theme inline {
|
|
30
|
+
--shadow-2xs: var(--ds-shadow-2xs);
|
|
31
|
+
--shadow-xs: var(--ds-shadow-xs);
|
|
32
|
+
--shadow-sm: var(--ds-shadow-small);
|
|
33
|
+
--shadow-md: var(--ds-shadow-medium);
|
|
34
|
+
--shadow-lg: var(--ds-shadow-large);
|
|
35
|
+
--shadow-xl: var(--ds-shadow-xl);
|
|
36
|
+
--shadow-2xl: var(--ds-shadow-2xl);
|
|
37
|
+
|
|
38
|
+
/* The ramp is the whole palette. Stock Tailwind colors (sky-*, yellow-*,
|
|
39
|
+
*-50, *-950 outside gray, ...) are wiped so an off-ramp class fails to
|
|
40
|
+
compile instead of silently painting. white/black survive for overlays
|
|
41
|
+
and content that must be literal (QR codes, mix-blend). */
|
|
42
|
+
--color-*: initial;
|
|
43
|
+
--color-white: var(--ds-white);
|
|
44
|
+
--color-black: var(--ds-black);
|
|
45
|
+
|
|
46
|
+
--color-background-100: var(--ds-background-100);
|
|
47
|
+
--color-background-200: var(--ds-background-200);
|
|
48
|
+
|
|
49
|
+
--color-gray-100: var(--ds-gray-100);
|
|
50
|
+
--color-gray-200: var(--ds-gray-200);
|
|
51
|
+
--color-gray-300: var(--ds-gray-300);
|
|
52
|
+
--color-gray-400: var(--ds-gray-400);
|
|
53
|
+
--color-gray-500: var(--ds-gray-500);
|
|
54
|
+
--color-gray-600: var(--ds-gray-600);
|
|
55
|
+
--color-gray-700: var(--ds-gray-700);
|
|
56
|
+
--color-gray-800: var(--ds-gray-800);
|
|
57
|
+
--color-gray-900: var(--ds-gray-900);
|
|
58
|
+
--color-gray-950: var(--ds-gray-950);
|
|
59
|
+
--color-gray-1000: var(--ds-gray-1000);
|
|
60
|
+
|
|
61
|
+
--color-gray-alpha-100: var(--ds-gray-alpha-100);
|
|
62
|
+
--color-gray-alpha-200: var(--ds-gray-alpha-200);
|
|
63
|
+
--color-gray-alpha-300: var(--ds-gray-alpha-300);
|
|
64
|
+
--color-gray-alpha-400: var(--ds-gray-alpha-400);
|
|
65
|
+
--color-gray-alpha-500: var(--ds-gray-alpha-500);
|
|
66
|
+
--color-gray-alpha-600: var(--ds-gray-alpha-600);
|
|
67
|
+
--color-gray-alpha-700: var(--ds-gray-alpha-700);
|
|
68
|
+
--color-gray-alpha-800: var(--ds-gray-alpha-800);
|
|
69
|
+
--color-gray-alpha-900: var(--ds-gray-alpha-900);
|
|
70
|
+
--color-gray-alpha-1000: var(--ds-gray-alpha-1000);
|
|
71
|
+
|
|
72
|
+
--color-blue-100: var(--ds-blue-100);
|
|
73
|
+
--color-blue-200: var(--ds-blue-200);
|
|
74
|
+
--color-blue-300: var(--ds-blue-300);
|
|
75
|
+
--color-blue-400: var(--ds-blue-400);
|
|
76
|
+
--color-blue-500: var(--ds-blue-500);
|
|
77
|
+
--color-blue-600: var(--ds-blue-600);
|
|
78
|
+
--color-blue-700: var(--ds-blue-700);
|
|
79
|
+
--color-blue-800: var(--ds-blue-800);
|
|
80
|
+
--color-blue-900: var(--ds-blue-900);
|
|
81
|
+
--color-blue-1000: var(--ds-blue-1000);
|
|
82
|
+
|
|
83
|
+
--color-red-100: var(--ds-red-100);
|
|
84
|
+
--color-red-200: var(--ds-red-200);
|
|
85
|
+
--color-red-300: var(--ds-red-300);
|
|
86
|
+
--color-red-400: var(--ds-red-400);
|
|
87
|
+
--color-red-500: var(--ds-red-500);
|
|
88
|
+
--color-red-600: var(--ds-red-600);
|
|
89
|
+
--color-red-700: var(--ds-red-700);
|
|
90
|
+
--color-red-800: var(--ds-red-800);
|
|
91
|
+
--color-red-900: var(--ds-red-900);
|
|
92
|
+
--color-red-1000: var(--ds-red-1000);
|
|
93
|
+
|
|
94
|
+
--color-amber-100: var(--ds-amber-100);
|
|
95
|
+
--color-amber-200: var(--ds-amber-200);
|
|
96
|
+
--color-amber-300: var(--ds-amber-300);
|
|
97
|
+
--color-amber-400: var(--ds-amber-400);
|
|
98
|
+
--color-amber-500: var(--ds-amber-500);
|
|
99
|
+
--color-amber-600: var(--ds-amber-600);
|
|
100
|
+
--color-amber-700: var(--ds-amber-700);
|
|
101
|
+
--color-amber-800: var(--ds-amber-800);
|
|
102
|
+
--color-amber-900: var(--ds-amber-900);
|
|
103
|
+
--color-amber-1000: var(--ds-amber-1000);
|
|
104
|
+
|
|
105
|
+
--color-green-100: var(--ds-green-100);
|
|
106
|
+
--color-green-200: var(--ds-green-200);
|
|
107
|
+
--color-green-300: var(--ds-green-300);
|
|
108
|
+
--color-green-400: var(--ds-green-400);
|
|
109
|
+
--color-green-500: var(--ds-green-500);
|
|
110
|
+
--color-green-600: var(--ds-green-600);
|
|
111
|
+
--color-green-700: var(--ds-green-700);
|
|
112
|
+
--color-green-800: var(--ds-green-800);
|
|
113
|
+
--color-green-900: var(--ds-green-900);
|
|
114
|
+
--color-green-1000: var(--ds-green-1000);
|
|
115
|
+
|
|
116
|
+
--color-teal-100: var(--ds-teal-100);
|
|
117
|
+
--color-teal-200: var(--ds-teal-200);
|
|
118
|
+
--color-teal-300: var(--ds-teal-300);
|
|
119
|
+
--color-teal-400: var(--ds-teal-400);
|
|
120
|
+
--color-teal-500: var(--ds-teal-500);
|
|
121
|
+
--color-teal-600: var(--ds-teal-600);
|
|
122
|
+
--color-teal-700: var(--ds-teal-700);
|
|
123
|
+
--color-teal-800: var(--ds-teal-800);
|
|
124
|
+
--color-teal-900: var(--ds-teal-900);
|
|
125
|
+
--color-teal-1000: var(--ds-teal-1000);
|
|
126
|
+
|
|
127
|
+
--color-purple-100: var(--ds-purple-100);
|
|
128
|
+
--color-purple-200: var(--ds-purple-200);
|
|
129
|
+
--color-purple-300: var(--ds-purple-300);
|
|
130
|
+
--color-purple-400: var(--ds-purple-400);
|
|
131
|
+
--color-purple-500: var(--ds-purple-500);
|
|
132
|
+
--color-purple-600: var(--ds-purple-600);
|
|
133
|
+
--color-purple-700: var(--ds-purple-700);
|
|
134
|
+
--color-purple-800: var(--ds-purple-800);
|
|
135
|
+
--color-purple-900: var(--ds-purple-900);
|
|
136
|
+
--color-purple-1000: var(--ds-purple-1000);
|
|
137
|
+
|
|
138
|
+
--color-pink-100: var(--ds-pink-100);
|
|
139
|
+
--color-pink-200: var(--ds-pink-200);
|
|
140
|
+
--color-pink-300: var(--ds-pink-300);
|
|
141
|
+
--color-pink-400: var(--ds-pink-400);
|
|
142
|
+
--color-pink-500: var(--ds-pink-500);
|
|
143
|
+
--color-pink-600: var(--ds-pink-600);
|
|
144
|
+
--color-pink-700: var(--ds-pink-700);
|
|
145
|
+
--color-pink-800: var(--ds-pink-800);
|
|
146
|
+
--color-pink-900: var(--ds-pink-900);
|
|
147
|
+
--color-pink-1000: var(--ds-pink-1000);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
:root {
|
|
151
|
+
--radius: 0.875rem;
|
|
152
|
+
--ds-black: oklch(0 0 0);
|
|
153
|
+
--ds-white: oklch(1 0 0);
|
|
154
|
+
--ds-background-100: oklch(1 0 0);
|
|
155
|
+
--ds-background-200: oklch(0.984 0 0);
|
|
156
|
+
--ds-gray-100: oklch(0.961 0 0);
|
|
157
|
+
--ds-gray-200: oklch(0.94 0 0);
|
|
158
|
+
--ds-gray-300: oklch(0.925 0 0);
|
|
159
|
+
--ds-gray-400: oklch(0.937 0 0);
|
|
160
|
+
--ds-gray-500: oklch(0.836 0 0);
|
|
161
|
+
--ds-gray-600: oklch(0.732 0 0);
|
|
162
|
+
--ds-gray-700: oklch(0.65 0 0);
|
|
163
|
+
--ds-gray-800: oklch(0.59 0 0);
|
|
164
|
+
--ds-gray-900: oklch(0.51 0 0);
|
|
165
|
+
--ds-gray-950: oklch(0.3 0 0);
|
|
166
|
+
--ds-gray-1000: oklch(0 0 0);
|
|
167
|
+
--ds-gray-alpha-100: oklch(0 0 0 / 0.05);
|
|
168
|
+
--ds-gray-alpha-200: oklch(0 0 0 / 0.081);
|
|
169
|
+
--ds-gray-alpha-300: oklch(0 0 0 / 0.1);
|
|
170
|
+
--ds-gray-alpha-400: oklch(0 0 0 / 0.08);
|
|
171
|
+
--ds-gray-alpha-500: oklch(0 0 0 / 0.21);
|
|
172
|
+
--ds-gray-alpha-600: oklch(0 0 0 / 0.24);
|
|
173
|
+
--ds-gray-alpha-700: oklch(0 0 0 / 0.44);
|
|
174
|
+
--ds-gray-alpha-800: oklch(0 0 0 / 0.51);
|
|
175
|
+
--ds-gray-alpha-900: oklch(0 0 0 / 0.6);
|
|
176
|
+
--ds-gray-alpha-1000: oklch(0 0 0 / 1);
|
|
177
|
+
--ds-blue-100: oklch(97.32% 0.0141 251.56);
|
|
178
|
+
--ds-blue-200: oklch(96.29% 0.0195 250.59);
|
|
179
|
+
--ds-blue-300: oklch(94.58% 0.0293 249.85);
|
|
180
|
+
--ds-blue-400: oklch(91.58% 0.0473 245.12);
|
|
181
|
+
--ds-blue-500: oklch(82.75% 0.0979 248.48);
|
|
182
|
+
--ds-blue-600: oklch(73.08% 0.1583 248.13);
|
|
183
|
+
--ds-blue-700: oklch(57.61% 0.2508 258.23);
|
|
184
|
+
--ds-blue-800: oklch(51.51% 0.2399 257.85);
|
|
185
|
+
--ds-blue-900: oklch(53.18% 0.2399 256.99);
|
|
186
|
+
--ds-blue-1000: oklch(26.67% 0.1099 254.34);
|
|
187
|
+
--ds-red-100: oklch(96.5% 0.0223 13.09);
|
|
188
|
+
--ds-red-200: oklch(95.41% 0.0299 14.25);
|
|
189
|
+
--ds-red-300: oklch(94.33% 0.0369 15.01);
|
|
190
|
+
--ds-red-400: oklch(91.51% 0.0471 19.8);
|
|
191
|
+
--ds-red-500: oklch(84.47% 0.1018 17.71);
|
|
192
|
+
--ds-red-600: oklch(71.12% 0.1881 21.22);
|
|
193
|
+
--ds-red-700: oklch(62.56% 0.2524 23.03);
|
|
194
|
+
--ds-red-800: oklch(58.19% 0.2482 25.15);
|
|
195
|
+
--ds-red-900: oklch(54.99% 0.232 25.29);
|
|
196
|
+
--ds-red-1000: oklch(24.8% 0.1041 18.86);
|
|
197
|
+
--ds-amber-100: oklch(97.48% 0.0331 85.79);
|
|
198
|
+
--ds-amber-200: oklch(96.81% 0.0495 90.24);
|
|
199
|
+
--ds-amber-300: oklch(95.93% 0.0636 90.52);
|
|
200
|
+
--ds-amber-400: oklch(91.02% 0.1322 88.25);
|
|
201
|
+
--ds-amber-500: oklch(86.55% 0.1583 79.63);
|
|
202
|
+
--ds-amber-600: oklch(80.25% 0.1953 73.59);
|
|
203
|
+
--ds-amber-700: oklch(81.87% 0.1969 76.46);
|
|
204
|
+
--ds-amber-800: oklch(77.21% 0.1991 64.28);
|
|
205
|
+
--ds-amber-900: oklch(52.79% 0.1496 54.65);
|
|
206
|
+
--ds-amber-1000: oklch(30.83% 0.099 45.48);
|
|
207
|
+
--ds-green-100: oklch(97.59% 0.0289 145.42);
|
|
208
|
+
--ds-green-200: oklch(96.92% 0.037 147.15);
|
|
209
|
+
--ds-green-300: oklch(94.6% 0.0674 144.23);
|
|
210
|
+
--ds-green-400: oklch(91.49% 0.0976 146.24);
|
|
211
|
+
--ds-green-500: oklch(85.45% 0.1627 146.3);
|
|
212
|
+
--ds-green-600: oklch(80.25% 0.214 145.18);
|
|
213
|
+
--ds-green-700: oklch(64.58% 0.1746 147.27);
|
|
214
|
+
--ds-green-800: oklch(57.81% 0.1507 147.5);
|
|
215
|
+
--ds-green-900: oklch(51.75% 0.1453 147.65);
|
|
216
|
+
--ds-green-1000: oklch(29.15% 0.1197 147.38);
|
|
217
|
+
--ds-teal-100: oklch(97.72% 0.0359 186.7);
|
|
218
|
+
--ds-teal-200: oklch(97.06% 0.0347 180.66);
|
|
219
|
+
--ds-teal-300: oklch(94.92% 0.0478 182.07);
|
|
220
|
+
--ds-teal-400: oklch(92.76% 0.0718 183.78);
|
|
221
|
+
--ds-teal-500: oklch(86.88% 0.1344 182.42);
|
|
222
|
+
--ds-teal-600: oklch(81.5% 0.161 178.96);
|
|
223
|
+
--ds-teal-700: oklch(64.92% 0.1572 181.95);
|
|
224
|
+
--ds-teal-800: oklch(57.53% 0.1392 181.66);
|
|
225
|
+
--ds-teal-900: oklch(52.08% 0.1251 182.93);
|
|
226
|
+
--ds-teal-1000: oklch(32.11% 0.0788 179.82);
|
|
227
|
+
--ds-purple-100: oklch(96.65% 0.0244 312.19);
|
|
228
|
+
--ds-purple-200: oklch(96.73% 0.0228 309.8);
|
|
229
|
+
--ds-purple-300: oklch(94.85% 0.0364 310.15);
|
|
230
|
+
--ds-purple-400: oklch(91.77% 0.0614 312.82);
|
|
231
|
+
--ds-purple-500: oklch(81.26% 0.1409 310.8);
|
|
232
|
+
--ds-purple-600: oklch(72.07% 0.2083 308.19);
|
|
233
|
+
--ds-purple-700: oklch(55.5% 0.3008 306.12);
|
|
234
|
+
--ds-purple-800: oklch(48.58% 0.2638 305.73);
|
|
235
|
+
--ds-purple-900: oklch(47.18% 0.2579 304);
|
|
236
|
+
--ds-purple-1000: oklch(23.96% 0.13 305.66);
|
|
237
|
+
--ds-pink-100: oklch(95.69% 0.0359 344.62);
|
|
238
|
+
--ds-pink-200: oklch(95.71% 0.0321 353.14);
|
|
239
|
+
--ds-pink-300: oklch(93.83% 0.0451 356.29);
|
|
240
|
+
--ds-pink-400: oklch(91.12% 0.0573 358.82);
|
|
241
|
+
--ds-pink-500: oklch(84.28% 0.0915 356.99);
|
|
242
|
+
--ds-pink-600: oklch(74.33% 0.1547 0.24);
|
|
243
|
+
--ds-pink-700: oklch(63.52% 0.238 1.01);
|
|
244
|
+
--ds-pink-800: oklch(59.51% 0.2339 4.21);
|
|
245
|
+
--ds-pink-900: oklch(53.5% 0.2058 2.84);
|
|
246
|
+
--ds-pink-1000: oklch(26% 0.0977 359);
|
|
247
|
+
--ds-shadow-background-border: 0 0 0 1px var(--ds-background-200);
|
|
248
|
+
|
|
249
|
+
--ds-shadow-border-base: 0 0 0 1px rgba(0, 0, 0, 0.08);
|
|
250
|
+
--ds-shadow-border-inset: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
|
|
251
|
+
|
|
252
|
+
--ds-shadow-border:
|
|
253
|
+
var(--ds-shadow-border-base), var(--ds-shadow-background-border);
|
|
254
|
+
|
|
255
|
+
--ds-shadow-2xs: 0px 1px 1px rgba(0, 0, 0, 0.02);
|
|
256
|
+
--ds-shadow-xs: 0px 1px 2px rgba(0, 0, 0, 0.04);
|
|
257
|
+
--ds-shadow-small: 0px 2px 2px rgba(0, 0, 0, 0.04);
|
|
258
|
+
--ds-shadow-border-small:
|
|
259
|
+
var(--ds-shadow-border-base), var(--ds-shadow-small),
|
|
260
|
+
var(--ds-shadow-background-border);
|
|
261
|
+
|
|
262
|
+
--ds-shadow-medium:
|
|
263
|
+
0px 2px 2px rgba(0, 0, 0, 0.04), 0px 8px 8px -8px rgba(0, 0, 0, 0.04);
|
|
264
|
+
--ds-shadow-border-medium:
|
|
265
|
+
var(--ds-shadow-border-base), var(--ds-shadow-medium),
|
|
266
|
+
var(--ds-shadow-background-border);
|
|
267
|
+
|
|
268
|
+
--ds-shadow-large:
|
|
269
|
+
0px 2px 2px rgba(0, 0, 0, 0.04), 0px 8px 16px -4px rgba(0, 0, 0, 0.04);
|
|
270
|
+
--ds-shadow-border-large:
|
|
271
|
+
var(--ds-shadow-border-base), var(--ds-shadow-large),
|
|
272
|
+
var(--ds-shadow-background-border);
|
|
273
|
+
|
|
274
|
+
--ds-shadow-tooltip:
|
|
275
|
+
var(--ds-shadow-border-base), 0px 1px 1px rgba(0, 0, 0, 0.02),
|
|
276
|
+
0px 4px 8px rgba(0, 0, 0, 0.04), var(--ds-shadow-background-border);
|
|
277
|
+
|
|
278
|
+
--ds-shadow-xl:
|
|
279
|
+
0px 1px 1px rgba(0, 0, 0, 0.02), 0px 4px 8px -4px rgba(0, 0, 0, 0.04);
|
|
280
|
+
|
|
281
|
+
--ds-shadow-2xl:
|
|
282
|
+
0px 1px 1px rgba(0, 0, 0, 0.02), 0px 4px 8px -4px rgba(0, 0, 0, 0.04),
|
|
283
|
+
0px 16px 24px -8px rgba(0, 0, 0, 0.06);
|
|
284
|
+
|
|
285
|
+
--ds-shadow-menu:
|
|
286
|
+
var(--ds-shadow-border-base), 0px 1px 1px rgba(0, 0, 0, 0.02),
|
|
287
|
+
0px 4px 8px -4px rgba(0, 0, 0, 0.04),
|
|
288
|
+
0px 16px 24px -8px rgba(0, 0, 0, 0.06), var(--ds-shadow-background-border);
|
|
289
|
+
|
|
290
|
+
--ds-shadow-modal:
|
|
291
|
+
var(--ds-shadow-border-base), 0px 1px 1px rgba(0, 0, 0, 0.02),
|
|
292
|
+
0px 8px 16px -4px rgba(0, 0, 0, 0.04),
|
|
293
|
+
0px 24px 32px -8px rgba(0, 0, 0, 0.06), var(--ds-shadow-background-border);
|
|
294
|
+
|
|
295
|
+
--ds-focus-ring:
|
|
296
|
+
0 0 0 2px var(--ds-background-100), 0 0 0 4px var(--ds-blue-700);
|
|
297
|
+
|
|
298
|
+
--ds-shadow-fullscreen:
|
|
299
|
+
var(--ds-shadow-border-base), 0px 1px 1px rgba(0, 0, 0, 0.02),
|
|
300
|
+
0px 8px 16px -4px rgba(0, 0, 0, 0.04),
|
|
301
|
+
0px 24px 32px -8px rgba(0, 0, 0, 0.06), var(--ds-shadow-background-border);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.dark {
|
|
305
|
+
--ds-background-100: oklch(0 0 0);
|
|
306
|
+
--ds-background-200: oklch(0.027 0 0);
|
|
307
|
+
--ds-gray-100: oklch(0.218 0 0);
|
|
308
|
+
--ds-gray-200: oklch(0.239 0 0);
|
|
309
|
+
--ds-gray-300: oklch(0.281 0 0);
|
|
310
|
+
--ds-gray-400: oklch(0.301 0 0);
|
|
311
|
+
--ds-gray-500: oklch(0.39 0 0);
|
|
312
|
+
--ds-gray-600: oklch(0.623 0 0);
|
|
313
|
+
--ds-gray-700: oklch(0.65 0 0);
|
|
314
|
+
--ds-gray-800: oklch(0.59 0 0);
|
|
315
|
+
--ds-gray-900: oklch(0.706 0 0);
|
|
316
|
+
--ds-gray-950: oklch(0.85 0 0);
|
|
317
|
+
--ds-gray-1000: oklch(1 0 0);
|
|
318
|
+
--ds-gray-alpha-100: oklch(1 0 0 / 0.07);
|
|
319
|
+
--ds-gray-alpha-200: oklch(1 0 0 / 0.09);
|
|
320
|
+
--ds-gray-alpha-300: oklch(1 0 0 / 0.13);
|
|
321
|
+
--ds-gray-alpha-400: oklch(1 0 0 / 0.14);
|
|
322
|
+
--ds-gray-alpha-500: oklch(1 0 0 / 0.24);
|
|
323
|
+
--ds-gray-alpha-600: oklch(1 0 0 / 0.51);
|
|
324
|
+
--ds-gray-alpha-700: oklch(1 0 0 / 0.54);
|
|
325
|
+
--ds-gray-alpha-800: oklch(1 0 0 / 0.47);
|
|
326
|
+
--ds-gray-alpha-900: oklch(1 0 0 / 0.61);
|
|
327
|
+
--ds-gray-alpha-1000: oklch(1 0 0 / 1);
|
|
328
|
+
--ds-blue-100: oklch(22.17% 0.069 259.89);
|
|
329
|
+
--ds-blue-200: oklch(25.45% 0.0811 255.8);
|
|
330
|
+
--ds-blue-300: oklch(30.86% 0.1022 255.21);
|
|
331
|
+
--ds-blue-400: oklch(34.1% 0.121 254.74);
|
|
332
|
+
--ds-blue-500: oklch(38.5% 0.1403 254.4);
|
|
333
|
+
--ds-blue-600: oklch(64.94% 0.1982 251.81);
|
|
334
|
+
--ds-blue-700: oklch(57.61% 0.2321 258.23);
|
|
335
|
+
--ds-blue-800: oklch(51.51% 0.2307 257.85);
|
|
336
|
+
--ds-blue-900: oklch(71.7% 0.1648 250.79);
|
|
337
|
+
--ds-blue-1000: oklch(96.75% 0.0179 242.42);
|
|
338
|
+
--ds-red-100: oklch(22.1% 0.0657 15.11);
|
|
339
|
+
--ds-red-200: oklch(25.93% 0.0834 19.02);
|
|
340
|
+
--ds-red-300: oklch(31.47% 0.1105 20.96);
|
|
341
|
+
--ds-red-400: oklch(35.27% 0.1273 21.23);
|
|
342
|
+
--ds-red-500: oklch(40.68% 0.1479 23.16);
|
|
343
|
+
--ds-red-600: oklch(62.56% 0.2277 23.03);
|
|
344
|
+
--ds-red-700: oklch(62.56% 0.2234 23.03);
|
|
345
|
+
--ds-red-800: oklch(58.01% 0.227 25.12);
|
|
346
|
+
--ds-red-900: oklch(69.96% 0.2136 22.03);
|
|
347
|
+
--ds-red-1000: oklch(95.6% 0.0293 6.61);
|
|
348
|
+
--ds-amber-100: oklch(22.46% 0.0538 76.04);
|
|
349
|
+
--ds-amber-200: oklch(24.95% 0.0642 64.78);
|
|
350
|
+
--ds-amber-300: oklch(32.34% 0.0837 63.83);
|
|
351
|
+
--ds-amber-400: oklch(35.53% 0.0903 66.3);
|
|
352
|
+
--ds-amber-500: oklch(41.55% 0.1044 67.98);
|
|
353
|
+
--ds-amber-600: oklch(75.04% 0.1737 74.49);
|
|
354
|
+
--ds-amber-700: oklch(81.87% 0.1969 76.46);
|
|
355
|
+
--ds-amber-800: oklch(77.21% 0.1991 64.28);
|
|
356
|
+
--ds-amber-900: oklch(77.21% 0.1991 64.28);
|
|
357
|
+
--ds-amber-1000: oklch(96.7% 0.0418 84.59);
|
|
358
|
+
--ds-green-100: oklch(23.09% 0.0716 149.68);
|
|
359
|
+
--ds-green-200: oklch(27.12% 0.0895 150.09);
|
|
360
|
+
--ds-green-300: oklch(29.84% 0.096 149.25);
|
|
361
|
+
--ds-green-400: oklch(34.39% 0.1039 147.78);
|
|
362
|
+
--ds-green-500: oklch(44.19% 0.1484 147.2);
|
|
363
|
+
--ds-green-600: oklch(58.11% 0.1815 146.55);
|
|
364
|
+
--ds-green-700: oklch(64.58% 0.199 147.27);
|
|
365
|
+
--ds-green-800: oklch(57.81% 0.1776 147.5);
|
|
366
|
+
--ds-green-900: oklch(73.1% 0.2158 148.29);
|
|
367
|
+
--ds-green-1000: oklch(96.76% 0.056 154.18);
|
|
368
|
+
--ds-teal-100: oklch(22.1% 0.0544 178.74);
|
|
369
|
+
--ds-teal-200: oklch(25.06% 0.062 178.76);
|
|
370
|
+
--ds-teal-300: oklch(31.5% 0.0767 180.99);
|
|
371
|
+
--ds-teal-400: oklch(32.43% 0.0763 180.13);
|
|
372
|
+
--ds-teal-500: oklch(43.35% 0.1055 180.97);
|
|
373
|
+
--ds-teal-600: oklch(60.71% 0.1485 180.24);
|
|
374
|
+
--ds-teal-700: oklch(64.92% 0.1403 181.95);
|
|
375
|
+
--ds-teal-800: oklch(57.53% 0.1392 181.66);
|
|
376
|
+
--ds-teal-900: oklch(74.56% 0.1765 182.8);
|
|
377
|
+
--ds-teal-1000: oklch(96.46% 0.056 180.29);
|
|
378
|
+
--ds-purple-100: oklch(22.34% 0.0779 316.87);
|
|
379
|
+
--ds-purple-200: oklch(25.91% 0.0921 314.41);
|
|
380
|
+
--ds-purple-300: oklch(31.98% 0.1219 312.41);
|
|
381
|
+
--ds-purple-400: oklch(35.93% 0.1504 309.78);
|
|
382
|
+
--ds-purple-500: oklch(40.99% 0.1721 307.92);
|
|
383
|
+
--ds-purple-600: oklch(55.5% 0.2191 306.12);
|
|
384
|
+
--ds-purple-700: oklch(55.5% 0.2186 306.12);
|
|
385
|
+
--ds-purple-800: oklch(48.58% 0.2102 305.73);
|
|
386
|
+
--ds-purple-900: oklch(69.87% 0.2037 309.51);
|
|
387
|
+
--ds-purple-1000: oklch(96.1% 0.0304 316.46);
|
|
388
|
+
--ds-pink-100: oklch(22.67% 0.0628 354.73);
|
|
389
|
+
--ds-pink-200: oklch(26.2% 0.0859 356.68);
|
|
390
|
+
--ds-pink-300: oklch(31.15% 0.1067 355.93);
|
|
391
|
+
--ds-pink-400: oklch(32.13% 0.1174 356.71);
|
|
392
|
+
--ds-pink-500: oklch(37.01% 0.1453 358.39);
|
|
393
|
+
--ds-pink-600: oklch(50.33% 0.2089 4.33);
|
|
394
|
+
--ds-pink-700: oklch(63.52% 0.2346 1.01);
|
|
395
|
+
--ds-pink-800: oklch(59.51% 0.2429 4.21);
|
|
396
|
+
--ds-pink-900: oklch(69.36% 0.2223 3.91);
|
|
397
|
+
--ds-pink-1000: oklch(95.74% 0.0326 350.08);
|
|
398
|
+
|
|
399
|
+
--ds-shadow-background-border: 0 0 0 1px var(--ds-background-200);
|
|
400
|
+
|
|
401
|
+
--ds-shadow-border-base: 0 0 0 1px rgba(255, 255, 255, 0.145);
|
|
402
|
+
--ds-shadow-border-inset: inset 0 0 0 1px rgba(255, 255, 255, 0.145);
|
|
403
|
+
|
|
404
|
+
--ds-shadow-border:
|
|
405
|
+
var(--ds-shadow-border-base), var(--ds-shadow-background-border);
|
|
406
|
+
|
|
407
|
+
--ds-shadow-2xs: 0px 1px 1px rgba(0, 0, 0, 0.08);
|
|
408
|
+
--ds-shadow-xs: 0px 1px 2px rgba(0, 0, 0, 0.16);
|
|
409
|
+
--ds-shadow-small: 0px 1px 2px rgba(0, 0, 0, 0.16);
|
|
410
|
+
--ds-shadow-border-small:
|
|
411
|
+
var(--ds-shadow-border-base), var(--ds-shadow-small),
|
|
412
|
+
var(--ds-shadow-background-border);
|
|
413
|
+
|
|
414
|
+
--ds-shadow-medium:
|
|
415
|
+
0px 2px 2px rgba(0, 0, 0, 0.16), 0px 8px 8px -8px rgba(0, 0, 0, 0.16);
|
|
416
|
+
--ds-shadow-border-medium:
|
|
417
|
+
var(--ds-shadow-border-base), var(--ds-shadow-medium),
|
|
418
|
+
var(--ds-shadow-background-border);
|
|
419
|
+
|
|
420
|
+
--ds-shadow-large:
|
|
421
|
+
0px 2px 2px rgba(0, 0, 0, 0.16), 0px 8px 16px -4px rgba(0, 0, 0, 0.16);
|
|
422
|
+
--ds-shadow-border-large:
|
|
423
|
+
var(--ds-shadow-border-base), var(--ds-shadow-large),
|
|
424
|
+
var(--ds-shadow-background-border);
|
|
425
|
+
|
|
426
|
+
--ds-shadow-tooltip:
|
|
427
|
+
var(--ds-shadow-border-base), 0px 1px 1px rgba(0, 0, 0, 0.08),
|
|
428
|
+
0px 4px 8px rgba(0, 0, 0, 0.16), var(--ds-shadow-background-border);
|
|
429
|
+
|
|
430
|
+
--ds-shadow-xl:
|
|
431
|
+
0px 1px 1px rgba(0, 0, 0, 0.08), 0px 4px 8px -4px rgba(0, 0, 0, 0.16);
|
|
432
|
+
|
|
433
|
+
--ds-shadow-2xl:
|
|
434
|
+
0px 1px 1px rgba(0, 0, 0, 0.08), 0px 4px 8px -4px rgba(0, 0, 0, 0.16),
|
|
435
|
+
0px 16px 24px -8px rgba(0, 0, 0, 0.24);
|
|
436
|
+
|
|
437
|
+
--ds-shadow-menu:
|
|
438
|
+
var(--ds-shadow-border-base), 0px 1px 1px rgba(0, 0, 0, 0.08),
|
|
439
|
+
0px 4px 8px -4px rgba(0, 0, 0, 0.16),
|
|
440
|
+
0px 16px 24px -8px rgba(0, 0, 0, 0.24), var(--ds-shadow-background-border);
|
|
441
|
+
|
|
442
|
+
--ds-shadow-modal:
|
|
443
|
+
var(--ds-shadow-border-base), 0px 1px 1px rgba(0, 0, 0, 0.08),
|
|
444
|
+
0px 8px 16px -4px rgba(0, 0, 0, 0.16),
|
|
445
|
+
0px 24px 32px -8px rgba(0, 0, 0, 0.24), var(--ds-shadow-background-border);
|
|
446
|
+
|
|
447
|
+
--ds-shadow-fullscreen:
|
|
448
|
+
var(--ds-shadow-border-base), 0px 1px 1px rgba(0, 0, 0, 0.08),
|
|
449
|
+
0px 8px 16px -4px rgba(0, 0, 0, 0.16),
|
|
450
|
+
0px 24px 32px -8px rgba(0, 0, 0, 0.24), var(--ds-shadow-background-border);
|
|
451
|
+
|
|
452
|
+
--ds-focus-ring:
|
|
453
|
+
0 0 0 2px var(--ds-background-100), 0 0 0 4px var(--ds-blue-900);
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
/* Shiki syntax highlighting palette */
|
|
457
|
+
:root {
|
|
458
|
+
--shiki-color-text: var(--ds-gray-1000);
|
|
459
|
+
--shiki-color-background: var(--ds-background-100);
|
|
460
|
+
--shiki-token-constant: var(--ds-blue-900);
|
|
461
|
+
--shiki-token-string: var(--ds-green-900);
|
|
462
|
+
--shiki-token-comment: var(--ds-gray-900);
|
|
463
|
+
--shiki-token-keyword: var(--ds-pink-900);
|
|
464
|
+
--shiki-token-parameter: var(--ds-amber-900);
|
|
465
|
+
--shiki-token-function: var(--ds-purple-900);
|
|
466
|
+
--shiki-token-string-expression: var(--ds-green-900);
|
|
467
|
+
--shiki-token-punctuation: var(--ds-gray-1000);
|
|
468
|
+
--shiki-token-link: var(--ds-green-900);
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
@layer base {
|
|
472
|
+
* {
|
|
473
|
+
@apply border-gray-alpha-400 outline-gray-600/50;
|
|
474
|
+
}
|
|
475
|
+
body {
|
|
476
|
+
@apply bg-background-100 text-gray-1000;
|
|
477
|
+
}
|
|
478
|
+
::selection {
|
|
479
|
+
background-color: var(--ds-gray-1000);
|
|
480
|
+
color: var(--ds-background-100);
|
|
481
|
+
}
|
|
482
|
+
button:not(:disabled),
|
|
483
|
+
[role="button"]:not(:disabled) {
|
|
484
|
+
cursor: pointer;
|
|
485
|
+
}
|
|
486
|
+
html {
|
|
487
|
+
@apply font-sans;
|
|
488
|
+
font-optical-sizing: auto;
|
|
489
|
+
font-feature-settings: "ss03" 1 /* round quotes & commas */;
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
/* Material */
|
|
494
|
+
|
|
495
|
+
@utility material-base {
|
|
496
|
+
box-shadow: var(--ds-shadow-border);
|
|
497
|
+
@apply rounded-md bg-background-100;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
@utility material-small {
|
|
501
|
+
box-shadow: var(--ds-shadow-border-small);
|
|
502
|
+
@apply rounded-md bg-background-100;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
@utility material-medium {
|
|
506
|
+
box-shadow: var(--ds-shadow-border-medium);
|
|
507
|
+
@apply rounded-xl bg-background-100;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
@utility material-large {
|
|
511
|
+
box-shadow: var(--ds-shadow-border-large);
|
|
512
|
+
@apply rounded-xl bg-background-100;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
@utility material-tooltip {
|
|
516
|
+
box-shadow: var(--ds-shadow-tooltip);
|
|
517
|
+
@apply rounded-md bg-background-100;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
@utility material-menu {
|
|
521
|
+
box-shadow: var(--ds-shadow-menu);
|
|
522
|
+
@apply rounded-md bg-background-100;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
@utility material-modal {
|
|
526
|
+
box-shadow: var(--ds-shadow-modal);
|
|
527
|
+
@apply rounded-xl bg-background-100;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
@utility material-fullscreen {
|
|
531
|
+
box-shadow: var(--ds-shadow-fullscreen);
|
|
532
|
+
@apply rounded-xl bg-background-100;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
/* Typography Heading */
|
|
536
|
+
|
|
537
|
+
@utility text-heading-72 {
|
|
538
|
+
@apply font-sans text-[72px] leading-[72px] font-[450] tracking-[-4.32px];
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
@utility text-heading-64 {
|
|
542
|
+
@apply font-sans text-[64px] leading-[64px] font-[450] tracking-[-2.56px];
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
@utility text-heading-56 {
|
|
546
|
+
@apply font-sans text-[56px] leading-[56px] font-[450] tracking-[-2.24px];
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
@utility text-heading-48 {
|
|
550
|
+
@apply font-sans text-[48px] leading-[56px] font-[450] tracking-[-1.92px];
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
@utility text-heading-40 {
|
|
554
|
+
@apply font-sans text-[40px] leading-[48px] font-[450] tracking-[-1.6px];
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
@utility text-heading-32 {
|
|
558
|
+
@apply font-sans text-[32px] leading-[40px] font-[450] tracking-[-1.28px] [&>strong]:font-medium [&>strong]:text-gray-900;
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
@utility text-heading-24 {
|
|
562
|
+
@apply font-sans text-[24px] leading-[32px] font-[450] tracking-[-0.96px] [&>strong]:font-medium [&>strong]:text-gray-900;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
@utility text-heading-20 {
|
|
566
|
+
@apply font-sans text-[20px] leading-[26px] font-[450] tracking-[-0.4px] [&>strong]:font-medium [&>strong]:text-gray-900;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
@utility text-heading-16 {
|
|
570
|
+
@apply font-sans text-[16px] leading-[24px] font-[450] tracking-[-0.32px] [&>strong]:font-medium [&>strong]:text-gray-900;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
@utility text-heading-14 {
|
|
574
|
+
@apply font-sans text-[14px] leading-[20px] font-[450] tracking-[-0.28px];
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
/* Typography Button */
|
|
578
|
+
|
|
579
|
+
@utility text-button-16 {
|
|
580
|
+
@apply font-sans text-[16px] leading-[20px] font-[450];
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
@utility text-button-14 {
|
|
584
|
+
@apply font-sans text-[14px] leading-[20px] font-[450];
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
@utility text-button-12 {
|
|
588
|
+
@apply font-sans text-[12px] leading-[16px] font-[450];
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
/* Typography Label */
|
|
592
|
+
|
|
593
|
+
@utility text-label-20 {
|
|
594
|
+
@apply font-sans text-[20px] leading-[32px] font-normal;
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
@utility text-label-18 {
|
|
598
|
+
@apply font-sans text-[18px] leading-[20px] font-normal;
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
@utility text-label-16 {
|
|
602
|
+
@apply font-sans text-[16px] leading-[20px] font-normal [&>strong]:font-medium [&>strong]:text-gray-1000;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
@utility text-label-16-mono {
|
|
606
|
+
@apply font-mono text-[16px] leading-[20px] font-normal;
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
@utility text-label-14 {
|
|
610
|
+
@apply font-sans text-[14px] leading-[20px] font-normal [&>strong]:font-medium [&>strong]:text-gray-1000;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
@utility text-label-14-mono {
|
|
614
|
+
@apply font-mono text-[14px] leading-[20px] font-normal;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
@utility text-label-13 {
|
|
618
|
+
@apply font-sans text-[13px] leading-[16px] font-normal [&>strong]:font-medium [&>strong]:text-gray-1000;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
@utility text-label-13-mono {
|
|
622
|
+
@apply font-mono text-[13px] leading-[20px] font-normal;
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
@utility text-label-12 {
|
|
626
|
+
@apply font-sans text-[12px] leading-[16px] font-normal [&>strong]:font-medium [&>strong]:text-gray-1000;
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
@utility text-label-12-mono {
|
|
630
|
+
@apply font-mono text-[12px] leading-[16px] font-normal;
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
/* Typography Copy */
|
|
634
|
+
|
|
635
|
+
@utility text-copy-24 {
|
|
636
|
+
@apply font-sans text-[24px] leading-[36px] font-normal [&>strong]:font-medium [&>strong]:text-gray-1000;
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
@utility text-copy-20 {
|
|
640
|
+
@apply font-sans text-[20px] leading-[36px] font-normal [&>strong]:font-medium [&>strong]:text-gray-1000;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
@utility text-copy-18 {
|
|
644
|
+
@apply font-sans text-[18px] leading-[28px] font-normal [&>strong]:font-medium [&>strong]:text-gray-1000;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
@utility text-copy-16 {
|
|
648
|
+
@apply font-sans text-[16px] leading-[24px] font-normal [&>strong]:font-medium [&>strong]:text-gray-1000;
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
@utility text-copy-14 {
|
|
652
|
+
@apply font-sans text-[14px] leading-[20px] font-normal [&>strong]:font-medium [&>strong]:text-gray-1000;
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
@utility text-copy-14-mono {
|
|
656
|
+
@apply font-mono text-[14px] leading-[20px] font-normal [&>strong]:font-medium [&>strong]:text-gray-1000;
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
@utility text-copy-13 {
|
|
660
|
+
@apply font-sans text-[13px] leading-[18px] font-normal [&>strong]:font-medium [&>strong]:text-gray-1000;
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
@utility text-copy-13-mono {
|
|
664
|
+
@apply font-mono text-[13px] leading-[18px] font-normal;
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
/* Prose. shadcn's typeset, rebound onto ziiz. Structure and selectors are
|
|
668
|
+
shadcn's verbatim (`.typeset *` narrowed with :where(), `.not-typeset` opts
|
|
669
|
+
out). What changes: every element binds to a named type role instead of
|
|
670
|
+
an em scale, colors come from the ramp, and rhythm is rem, not em, because
|
|
671
|
+
the roles are fixed px. A role is never overridden: no weight, size or
|
|
672
|
+
leading is set on an element that carries one. Rhythm follows the Vercel
|
|
673
|
+
blog article; body copy stays Copy 16 on Color 9, as the docs pages set
|
|
674
|
+
it. Diff this file against shadcn/typeset to see it. */
|
|
675
|
+
|
|
676
|
+
@layer components {
|
|
677
|
+
.typeset {
|
|
678
|
+
/* Rhythm. --typeset-flow is the gap between blocks, --typeset-section
|
|
679
|
+
the gap above a section heading; the rest derives from these two. */
|
|
680
|
+
--typeset-flow: 1.5rem;
|
|
681
|
+
--typeset-section: 4.5rem;
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
@layer components {
|
|
686
|
+
.typeset {
|
|
687
|
+
@apply text-copy-16 text-gray-900;
|
|
688
|
+
overflow-wrap: break-word;
|
|
689
|
+
margin-trim: block-start;
|
|
690
|
+
text-wrap: pretty;
|
|
691
|
+
|
|
692
|
+
--typeset-muted: var(--ds-gray-900);
|
|
693
|
+
--typeset-rule: var(--ds-gray-alpha-400);
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
.typeset
|
|
697
|
+
*:not(
|
|
698
|
+
:where(
|
|
699
|
+
.not-typeset,
|
|
700
|
+
[data-not-typeset],
|
|
701
|
+
.not-typeset *,
|
|
702
|
+
[data-not-typeset] *
|
|
703
|
+
)
|
|
704
|
+
) {
|
|
705
|
+
/* Paragraphs. */
|
|
706
|
+
&:where(p) {
|
|
707
|
+
margin-block-start: var(--typeset-flow);
|
|
708
|
+
margin-block-end: 0;
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
/* Headings. */
|
|
712
|
+
&:where(h1, h2, h3, h4, h5, h6) {
|
|
713
|
+
@apply text-gray-1000;
|
|
714
|
+
margin-block-end: 0;
|
|
715
|
+
text-wrap: balance;
|
|
716
|
+
}
|
|
717
|
+
&:where(h1) {
|
|
718
|
+
@apply text-heading-40;
|
|
719
|
+
margin-block-start: var(--typeset-section);
|
|
720
|
+
}
|
|
721
|
+
&:where(h2) {
|
|
722
|
+
@apply text-heading-32;
|
|
723
|
+
margin-block-start: var(--typeset-section);
|
|
724
|
+
}
|
|
725
|
+
/* Smaller steps are fractions of the section gap, so one knob moves them
|
|
726
|
+
all: 64, 48 and 32px at the default 72. */
|
|
727
|
+
&:where(h3) {
|
|
728
|
+
@apply text-heading-24;
|
|
729
|
+
margin-block-start: calc(var(--typeset-section) * 8 / 9);
|
|
730
|
+
}
|
|
731
|
+
&:where(h4) {
|
|
732
|
+
@apply text-heading-20;
|
|
733
|
+
margin-block-start: calc(var(--typeset-section) * 2 / 3);
|
|
734
|
+
}
|
|
735
|
+
&:where(h5) {
|
|
736
|
+
@apply text-heading-16;
|
|
737
|
+
margin-block-start: calc(var(--typeset-section) * 4 / 9);
|
|
738
|
+
}
|
|
739
|
+
&:where(h6) {
|
|
740
|
+
@apply text-heading-14;
|
|
741
|
+
margin-block-start: calc(var(--typeset-section) * 4 / 9);
|
|
742
|
+
}
|
|
743
|
+
/* Anchors. Clears the sticky site header. */
|
|
744
|
+
&:where([id]) {
|
|
745
|
+
scroll-margin-block-start: 6rem;
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
/* Headings own the space below them. The article keeps one gap
|
|
749
|
+
everywhere, so this is the flow gap, not a tighter one. */
|
|
750
|
+
&:where(h1 + *, h2 + *, h3 + *, h4 + *, h5 + *, h6 + *) {
|
|
751
|
+
margin-block-start: var(--typeset-flow);
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
/* Links. */
|
|
755
|
+
&:where(a) {
|
|
756
|
+
color: var(--ds-gray-1000);
|
|
757
|
+
text-decoration-line: underline;
|
|
758
|
+
text-decoration-color: var(--ds-gray-700);
|
|
759
|
+
text-decoration-thickness: 1px;
|
|
760
|
+
text-underline-offset: 4px;
|
|
761
|
+
}
|
|
762
|
+
&:where(a:hover) {
|
|
763
|
+
text-decoration-color: currentColor;
|
|
764
|
+
}
|
|
765
|
+
&:where(a:focus-visible) {
|
|
766
|
+
outline: 2px solid var(--ds-gray-600);
|
|
767
|
+
outline-offset: 4px;
|
|
768
|
+
border-radius: 0.125em;
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
/* Inline semantics. */
|
|
772
|
+
/* The Copy roles' Strong modifier, spelled out because the role sits on
|
|
773
|
+
the container, not on each paragraph. */
|
|
774
|
+
&:where(strong, b) {
|
|
775
|
+
@apply font-medium text-gray-1000;
|
|
776
|
+
}
|
|
777
|
+
&:where(mark) {
|
|
778
|
+
background-color: var(--ds-blue-200);
|
|
779
|
+
color: var(--ds-blue-900);
|
|
780
|
+
padding: 0.05em 0.15em;
|
|
781
|
+
border-radius: 0.2em;
|
|
782
|
+
}
|
|
783
|
+
&:where(abbr[title]) {
|
|
784
|
+
text-decoration-line: underline;
|
|
785
|
+
text-decoration-style: dotted;
|
|
786
|
+
text-underline-offset: 0.2em;
|
|
787
|
+
cursor: help;
|
|
788
|
+
}
|
|
789
|
+
&:where(del, s) {
|
|
790
|
+
color: var(--typeset-muted);
|
|
791
|
+
text-decoration-line: line-through;
|
|
792
|
+
}
|
|
793
|
+
&:where(sup, sub) {
|
|
794
|
+
font-size: 0.75em;
|
|
795
|
+
line-height: 0;
|
|
796
|
+
position: relative;
|
|
797
|
+
vertical-align: baseline;
|
|
798
|
+
}
|
|
799
|
+
&:where(sup) {
|
|
800
|
+
top: -0.5em;
|
|
801
|
+
}
|
|
802
|
+
&:where(sub) {
|
|
803
|
+
bottom: -0.25em;
|
|
804
|
+
}
|
|
805
|
+
&:where(sup a) {
|
|
806
|
+
text-decoration-line: none;
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
/* Lists. */
|
|
810
|
+
&:where(ul) {
|
|
811
|
+
list-style-type: disc;
|
|
812
|
+
}
|
|
813
|
+
&:where(ol) {
|
|
814
|
+
list-style-type: decimal;
|
|
815
|
+
}
|
|
816
|
+
&:where(ul ul) {
|
|
817
|
+
list-style-type: circle;
|
|
818
|
+
}
|
|
819
|
+
&:where(ul ul ul) {
|
|
820
|
+
list-style-type: square;
|
|
821
|
+
}
|
|
822
|
+
&:where(ol[type="a" i]) {
|
|
823
|
+
list-style-type: lower-alpha;
|
|
824
|
+
}
|
|
825
|
+
&:where(ol[type="i" i]) {
|
|
826
|
+
list-style-type: lower-roman;
|
|
827
|
+
}
|
|
828
|
+
&:where(ol[type="A" s]) {
|
|
829
|
+
list-style-type: upper-alpha;
|
|
830
|
+
}
|
|
831
|
+
&:where(ol[type="I" s]) {
|
|
832
|
+
list-style-type: upper-roman;
|
|
833
|
+
}
|
|
834
|
+
&:where(ul, ol) {
|
|
835
|
+
margin-block-start: var(--typeset-flow);
|
|
836
|
+
margin-block-end: 0;
|
|
837
|
+
padding-inline-start: 1.25rem;
|
|
838
|
+
}
|
|
839
|
+
&:where(li) {
|
|
840
|
+
margin-block-start: 0.5rem;
|
|
841
|
+
padding-inline-start: 0.5rem;
|
|
842
|
+
}
|
|
843
|
+
&:where(li > p, li > ul, li > ol) {
|
|
844
|
+
margin-block-start: 0.5rem;
|
|
845
|
+
}
|
|
846
|
+
&:where(ul > li)::marker {
|
|
847
|
+
color: var(--ds-gray-600);
|
|
848
|
+
}
|
|
849
|
+
&:where(ol > li)::marker {
|
|
850
|
+
color: var(--ds-gray-600);
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
/* GFM task lists. */
|
|
854
|
+
&:where(ul.contains-task-list) {
|
|
855
|
+
list-style-type: none;
|
|
856
|
+
padding-inline-start: 0.25em;
|
|
857
|
+
}
|
|
858
|
+
&:where(li.task-list-item > input[type="checkbox"]) {
|
|
859
|
+
margin-inline-end: 0.5em;
|
|
860
|
+
vertical-align: -0.1em;
|
|
861
|
+
accent-color: var(--ds-gray-1000);
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
/* Disclosures, shaped like the Accordion component: the summary as the
|
|
865
|
+
trigger with the chevron at the end, the content flush beneath. Type
|
|
866
|
+
stays the body role throughout and rows carry no hairline. The
|
|
867
|
+
component is the source of truth for the shape; mirror it here when
|
|
868
|
+
it changes. Adjacent details stack into one accordion. */
|
|
869
|
+
&:where(details) {
|
|
870
|
+
margin-block-start: var(--typeset-flow);
|
|
871
|
+
margin-block-end: 0;
|
|
872
|
+
}
|
|
873
|
+
&:where(details + details) {
|
|
874
|
+
margin-block-start: 0;
|
|
875
|
+
}
|
|
876
|
+
&:where(details[open]) {
|
|
877
|
+
padding-block-end: 1rem;
|
|
878
|
+
}
|
|
879
|
+
&:where(summary) {
|
|
880
|
+
@apply rounded-md text-gray-1000;
|
|
881
|
+
display: flex;
|
|
882
|
+
align-items: flex-start;
|
|
883
|
+
justify-content: space-between;
|
|
884
|
+
gap: 1rem;
|
|
885
|
+
padding-block: 1rem;
|
|
886
|
+
border: 1px solid transparent;
|
|
887
|
+
list-style: none;
|
|
888
|
+
cursor: pointer;
|
|
889
|
+
outline: none;
|
|
890
|
+
}
|
|
891
|
+
&:where(summary)::-webkit-details-marker {
|
|
892
|
+
display: none;
|
|
893
|
+
}
|
|
894
|
+
&:where(summary:hover) {
|
|
895
|
+
text-decoration-line: underline;
|
|
896
|
+
}
|
|
897
|
+
&:where(summary:focus-visible) {
|
|
898
|
+
border-color: var(--ds-gray-600);
|
|
899
|
+
box-shadow: 0 0 0 3px
|
|
900
|
+
color-mix(in oklab, var(--ds-gray-600) 50%, transparent);
|
|
901
|
+
}
|
|
902
|
+
&:where(summary)::after {
|
|
903
|
+
content: "";
|
|
904
|
+
flex-shrink: 0;
|
|
905
|
+
width: 1rem;
|
|
906
|
+
height: 1rem;
|
|
907
|
+
margin-inline-start: auto;
|
|
908
|
+
background-color: var(--ds-gray-900);
|
|
909
|
+
mask: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6l6 -6'/%3E%3C/svg%3E")
|
|
910
|
+
center / contain no-repeat;
|
|
911
|
+
}
|
|
912
|
+
&:where(details[open] > summary)::after {
|
|
913
|
+
transform: rotate(180deg);
|
|
914
|
+
}
|
|
915
|
+
&:where(details > :not(summary)) {
|
|
916
|
+
margin-block-start: 1rem;
|
|
917
|
+
}
|
|
918
|
+
&:where(details > summary + *) {
|
|
919
|
+
margin-block-start: 0;
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
/* Keyboard keys. */
|
|
923
|
+
/* Keyboard keys, matching the ui Kbd component. */
|
|
924
|
+
&:where(kbd) {
|
|
925
|
+
@apply inline-flex h-5 min-w-5 items-center justify-center rounded-[min(var(--radius-sm),6px)] bg-gray-100 px-1 text-label-12 text-gray-900;
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
/* Definition lists. */
|
|
929
|
+
&:where(dl) {
|
|
930
|
+
margin-block-start: var(--typeset-flow);
|
|
931
|
+
margin-block-end: 0;
|
|
932
|
+
}
|
|
933
|
+
&:where(dt) {
|
|
934
|
+
@apply text-gray-1000;
|
|
935
|
+
margin-block-start: var(--typeset-flow);
|
|
936
|
+
}
|
|
937
|
+
&:where(dt + dt) {
|
|
938
|
+
margin-block-start: 0.25em;
|
|
939
|
+
}
|
|
940
|
+
&:where(dd) {
|
|
941
|
+
margin-block-start: 0.25em;
|
|
942
|
+
margin-inline-start: 0;
|
|
943
|
+
padding-inline-start: 1em;
|
|
944
|
+
color: var(--typeset-muted);
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
/* Inline code. */
|
|
948
|
+
&:where(:not(pre) > code) {
|
|
949
|
+
@apply rounded-[min(var(--radius-sm),6px)] bg-gray-100 text-copy-13-mono;
|
|
950
|
+
padding: 0.125rem 0.25rem;
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
/* Code blocks. */
|
|
954
|
+
&:where(pre) {
|
|
955
|
+
@apply rounded-lg bg-background-200 text-copy-13-mono text-gray-1000;
|
|
956
|
+
border: 1px solid var(--typeset-rule);
|
|
957
|
+
tab-size: 2;
|
|
958
|
+
direction: ltr;
|
|
959
|
+
padding: 1rem;
|
|
960
|
+
overflow-x: auto;
|
|
961
|
+
margin-block-start: calc(var(--typeset-flow) + 0.25rem);
|
|
962
|
+
margin-block-end: 0;
|
|
963
|
+
}
|
|
964
|
+
&:where(pre code) {
|
|
965
|
+
background-color: transparent;
|
|
966
|
+
font: inherit;
|
|
967
|
+
padding: 0;
|
|
968
|
+
border-radius: 0;
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
/* Blockquote: a pull quote, as the article sets it. No bar; the quote
|
|
972
|
+
sits on Heading 24 with hanging curly quotes drawn here, so markdown
|
|
973
|
+
needs no extra markup, and a trailing <footer> carries the attribution
|
|
974
|
+
on Copy 14, with <cite> for the name. */
|
|
975
|
+
&:where(blockquote) {
|
|
976
|
+
@apply text-heading-24 text-gray-1000;
|
|
977
|
+
display: grid;
|
|
978
|
+
gap: 1rem;
|
|
979
|
+
margin-block-start: calc(var(--typeset-section) / 2);
|
|
980
|
+
margin-block-end: 0;
|
|
981
|
+
margin-inline: 0;
|
|
982
|
+
}
|
|
983
|
+
&:where(blockquote + *) {
|
|
984
|
+
margin-block-start: calc(var(--typeset-section) / 2);
|
|
985
|
+
}
|
|
986
|
+
&:where(blockquote > *) {
|
|
987
|
+
margin-block-start: 0;
|
|
988
|
+
}
|
|
989
|
+
&:where(blockquote > p) {
|
|
990
|
+
position: relative;
|
|
991
|
+
}
|
|
992
|
+
&:where(blockquote > p:first-of-type)::before {
|
|
993
|
+
content: "\201C";
|
|
994
|
+
position: absolute;
|
|
995
|
+
inset-inline-start: -0.75rem;
|
|
996
|
+
}
|
|
997
|
+
&:where(blockquote > p:last-of-type)::after {
|
|
998
|
+
content: "\201D";
|
|
999
|
+
}
|
|
1000
|
+
&:where(blockquote > footer) {
|
|
1001
|
+
@apply text-copy-14 text-gray-900;
|
|
1002
|
+
}
|
|
1003
|
+
&:where(blockquote cite) {
|
|
1004
|
+
@apply text-gray-1000;
|
|
1005
|
+
font-style: normal;
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
/* Dividers. */
|
|
1009
|
+
&:where(hr) {
|
|
1010
|
+
border: 0;
|
|
1011
|
+
border-block-start: 1px solid var(--typeset-rule);
|
|
1012
|
+
margin-block: var(--typeset-section);
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
/* GFM footnotes. */
|
|
1016
|
+
&:where(.footnotes, [data-footnotes]) {
|
|
1017
|
+
@apply text-copy-14;
|
|
1018
|
+
margin-block-start: var(--typeset-section);
|
|
1019
|
+
border-block-start: 1px solid var(--typeset-rule);
|
|
1020
|
+
padding-block-start: var(--typeset-flow);
|
|
1021
|
+
color: var(--typeset-muted);
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1024
|
+
/* Math. */
|
|
1025
|
+
&:where(math[display="block"]) {
|
|
1026
|
+
margin-block-start: var(--typeset-flow);
|
|
1027
|
+
margin-block-end: 0;
|
|
1028
|
+
overflow-x: auto;
|
|
1029
|
+
overflow-y: hidden;
|
|
1030
|
+
padding-block: 0.25em;
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
/* Media. */
|
|
1034
|
+
&:where(img, video) {
|
|
1035
|
+
@apply rounded-lg;
|
|
1036
|
+
max-width: 100%;
|
|
1037
|
+
height: auto;
|
|
1038
|
+
margin-block-start: calc(var(--typeset-flow) + 0.25rem);
|
|
1039
|
+
margin-block-end: 0;
|
|
1040
|
+
}
|
|
1041
|
+
&:where(p img) {
|
|
1042
|
+
margin-block-start: 0;
|
|
1043
|
+
}
|
|
1044
|
+
&:where(figure) {
|
|
1045
|
+
margin-block-start: 2.5rem;
|
|
1046
|
+
margin-block-end: 0;
|
|
1047
|
+
margin-inline: 0;
|
|
1048
|
+
}
|
|
1049
|
+
&:where(figure + *) {
|
|
1050
|
+
margin-block-start: 2.5rem;
|
|
1051
|
+
}
|
|
1052
|
+
&:where(figcaption, caption) {
|
|
1053
|
+
@apply text-copy-14;
|
|
1054
|
+
color: var(--typeset-muted);
|
|
1055
|
+
text-align: center;
|
|
1056
|
+
margin-block-start: 1rem;
|
|
1057
|
+
}
|
|
1058
|
+
&:where(caption) {
|
|
1059
|
+
caption-side: bottom;
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
/* The docs' CodeBlock figure takes the pre's flow margin; its chrome is
|
|
1063
|
+
defined below, outside the typeset, so it renders the same anywhere. */
|
|
1064
|
+
&:where([data-slot="code-block"]) {
|
|
1065
|
+
margin-block-start: calc(var(--typeset-flow) + 0.25rem);
|
|
1066
|
+
}
|
|
1067
|
+
&:where([data-slot="code-block"] + *) {
|
|
1068
|
+
margin-block-start: var(--typeset-flow);
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
/* Heading anchors, as the docs' heading map renders them. */
|
|
1072
|
+
&:where([data-heading-anchor]) {
|
|
1073
|
+
margin-inline-start: 0.4em;
|
|
1074
|
+
color: var(--ds-gray-700);
|
|
1075
|
+
text-decoration: none;
|
|
1076
|
+
opacity: 0;
|
|
1077
|
+
transition: opacity 150ms;
|
|
1078
|
+
}
|
|
1079
|
+
&:where(:is(h1, h2, h3, h4, h5, h6):hover [data-heading-anchor]),
|
|
1080
|
+
&:where([data-heading-anchor]:focus-visible) {
|
|
1081
|
+
opacity: 1;
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
/* Keyboard focus on scroll regions. */
|
|
1085
|
+
&:where(:is(.typeset-scroll, pre):focus-visible) {
|
|
1086
|
+
outline: 2px solid var(--ds-gray-600);
|
|
1087
|
+
outline-offset: 4px;
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
/* Tables. Mirrors components/ui/table.tsx: Heading 14 header cells,
|
|
1091
|
+
Label 14 body cells, middle alignment, row hover, tinted footer, no
|
|
1092
|
+
trailing rule. Padding is roomier than the component (12px / 16px vs
|
|
1093
|
+
8px) because prose tables read, they don't scan. Separators sit on cells, not
|
|
1094
|
+
tr:last-child: append-safe. Bare tables stay real tables (keep their
|
|
1095
|
+
semantics) and wrap to fit. */
|
|
1096
|
+
&:where(table) {
|
|
1097
|
+
@apply text-label-14;
|
|
1098
|
+
max-width: 100%;
|
|
1099
|
+
font-variant-numeric: tabular-nums;
|
|
1100
|
+
border-collapse: separate;
|
|
1101
|
+
border-spacing: 0;
|
|
1102
|
+
margin-block-start: calc(var(--typeset-flow) + 0.25rem);
|
|
1103
|
+
margin-block-end: 0;
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
/* Horizontal scroll for any wide block. Wrap it and the wrapper owns the
|
|
1107
|
+
flow margin. Tables shrink to fit, so widen the table to make it scroll
|
|
1108
|
+
instead of compress. */
|
|
1109
|
+
&:where(.typeset-scroll) {
|
|
1110
|
+
overflow-x: auto;
|
|
1111
|
+
margin-block-start: calc(var(--typeset-flow) + 0.25rem);
|
|
1112
|
+
}
|
|
1113
|
+
&:where(.typeset-scroll > *) {
|
|
1114
|
+
margin-block-start: 0;
|
|
1115
|
+
}
|
|
1116
|
+
&:where(.typeset-scroll table) {
|
|
1117
|
+
width: max-content;
|
|
1118
|
+
max-width: none;
|
|
1119
|
+
}
|
|
1120
|
+
&:where(thead th) {
|
|
1121
|
+
@apply text-heading-14 text-gray-1000;
|
|
1122
|
+
height: 2.75rem;
|
|
1123
|
+
padding: 0 1rem;
|
|
1124
|
+
text-align: start;
|
|
1125
|
+
vertical-align: middle;
|
|
1126
|
+
white-space: nowrap;
|
|
1127
|
+
}
|
|
1128
|
+
&:where(:is(tbody, tfoot) :is(td, th)) {
|
|
1129
|
+
padding: 0.75rem 1rem;
|
|
1130
|
+
text-align: start;
|
|
1131
|
+
vertical-align: middle;
|
|
1132
|
+
border-block-start: 1px solid var(--typeset-rule);
|
|
1133
|
+
}
|
|
1134
|
+
&:where(tbody th, tfoot th) {
|
|
1135
|
+
@apply text-gray-1000;
|
|
1136
|
+
}
|
|
1137
|
+
&:where(tbody tr) {
|
|
1138
|
+
transition: background-color 150ms;
|
|
1139
|
+
}
|
|
1140
|
+
&:where(tbody tr:hover) {
|
|
1141
|
+
@apply bg-gray-alpha-100;
|
|
1142
|
+
}
|
|
1143
|
+
&:where(tfoot) {
|
|
1144
|
+
@apply bg-gray-100/50;
|
|
1145
|
+
}
|
|
1146
|
+
&:where(th[align="center"], td[align="center"]) {
|
|
1147
|
+
text-align: center;
|
|
1148
|
+
}
|
|
1149
|
+
&:where(th[align="right"], td[align="right"]) {
|
|
1150
|
+
text-align: end;
|
|
1151
|
+
}
|
|
1152
|
+
|
|
1153
|
+
/* Blocks inside list items keep the list's tighter rhythm. */
|
|
1154
|
+
&:where(li > blockquote, li > table, li > figure, li > pre) {
|
|
1155
|
+
margin-block-start: 0.5rem;
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
@media print {
|
|
1159
|
+
&:where(pre, table, blockquote, figure) {
|
|
1160
|
+
break-inside: avoid;
|
|
1161
|
+
}
|
|
1162
|
+
&:where(h1, h2, h3, h4) {
|
|
1163
|
+
break-after: avoid;
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1167
|
+
/* Forced colors strips the code background, so give it a border. */
|
|
1168
|
+
@media (forced-colors: active) {
|
|
1169
|
+
&:where(:not(pre) > code) {
|
|
1170
|
+
border: 1px solid;
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1174
|
+
|
|
1175
|
+
/* First child adds no space above. Last so it wins ties. List items are
|
|
1176
|
+
left out: a block inside one usually follows inline text, which CSS
|
|
1177
|
+
cannot see, so it keeps the item gap. Sections are added: a body often
|
|
1178
|
+
nests one per heading, and its first child should open flush. */
|
|
1179
|
+
.typeset
|
|
1180
|
+
> :where(:first-child):not(
|
|
1181
|
+
:where(
|
|
1182
|
+
.not-typeset,
|
|
1183
|
+
[data-not-typeset],
|
|
1184
|
+
.not-typeset *,
|
|
1185
|
+
[data-not-typeset] *
|
|
1186
|
+
)
|
|
1187
|
+
),
|
|
1188
|
+
.typeset
|
|
1189
|
+
> :where(:first-child)
|
|
1190
|
+
> :where(:first-child):not(
|
|
1191
|
+
:where(
|
|
1192
|
+
.not-typeset,
|
|
1193
|
+
[data-not-typeset],
|
|
1194
|
+
.not-typeset *,
|
|
1195
|
+
[data-not-typeset] *
|
|
1196
|
+
)
|
|
1197
|
+
),
|
|
1198
|
+
.typeset
|
|
1199
|
+
:where(
|
|
1200
|
+
section > :first-child,
|
|
1201
|
+
blockquote > :first-child,
|
|
1202
|
+
td > :first-child,
|
|
1203
|
+
th > :first-child,
|
|
1204
|
+
dd > :first-child,
|
|
1205
|
+
figure > :first-child,
|
|
1206
|
+
figure > picture > img
|
|
1207
|
+
):not(
|
|
1208
|
+
:where(
|
|
1209
|
+
.not-typeset,
|
|
1210
|
+
[data-not-typeset],
|
|
1211
|
+
.not-typeset *,
|
|
1212
|
+
[data-not-typeset] *
|
|
1213
|
+
)
|
|
1214
|
+
) {
|
|
1215
|
+
margin-block-start: 0;
|
|
1216
|
+
}
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
/* Code block chrome: the figure the docs' CodeBlock renders around a pre,
|
|
1220
|
+
with an optional title bar and a copy button. Independent of .typeset so a
|
|
1221
|
+
block inside a preview or a not-typeset region looks the same as one in an
|
|
1222
|
+
article. Matches the typeset's bare pre. */
|
|
1223
|
+
@layer components {
|
|
1224
|
+
/* The block's metrics. On :root so the chrome around a block (a preview's
|
|
1225
|
+
reveal, say) can line up with the rows inside it. */
|
|
1226
|
+
:root {
|
|
1227
|
+
--code-block-pad: 1rem;
|
|
1228
|
+
--code-block-line: 18px;
|
|
1229
|
+
--code-block-title-height: 2.5rem;
|
|
1230
|
+
--code-block-copy-size: 2rem;
|
|
1231
|
+
--code-block-copy-gutter: 3rem;
|
|
1232
|
+
--code-block-border: 1px;
|
|
1233
|
+
}
|
|
1234
|
+
[data-slot="code-block"] {
|
|
1235
|
+
position: relative;
|
|
1236
|
+
}
|
|
1237
|
+
[data-slot="code-block"] :where(pre) {
|
|
1238
|
+
@apply rounded-lg bg-background-200 text-copy-13-mono text-gray-1000;
|
|
1239
|
+
border: var(--code-block-border) solid var(--ds-gray-alpha-400);
|
|
1240
|
+
tab-size: 2;
|
|
1241
|
+
direction: ltr;
|
|
1242
|
+
padding: var(--code-block-pad) var(--code-block-copy-gutter)
|
|
1243
|
+
var(--code-block-pad) var(--code-block-pad);
|
|
1244
|
+
overflow-x: auto;
|
|
1245
|
+
margin: 0;
|
|
1246
|
+
}
|
|
1247
|
+
[data-slot="code-block"] :where(pre code) {
|
|
1248
|
+
background-color: transparent;
|
|
1249
|
+
font: inherit;
|
|
1250
|
+
padding: 0;
|
|
1251
|
+
border-radius: 0;
|
|
1252
|
+
}
|
|
1253
|
+
[data-slot="code-block"][data-titled] {
|
|
1254
|
+
@apply rounded-lg bg-background-200;
|
|
1255
|
+
border: var(--code-block-border) solid var(--ds-gray-alpha-400);
|
|
1256
|
+
overflow: hidden;
|
|
1257
|
+
}
|
|
1258
|
+
[data-slot="code-block"][data-titled] :where(pre) {
|
|
1259
|
+
border: 0;
|
|
1260
|
+
border-radius: 0;
|
|
1261
|
+
/* The copy button sits in the title bar, so the code keeps the full
|
|
1262
|
+
width instead of reserving a gutter for it. */
|
|
1263
|
+
padding-inline-end: var(--code-block-pad);
|
|
1264
|
+
}
|
|
1265
|
+
[data-slot="code-block"] > figcaption {
|
|
1266
|
+
@apply text-label-13-mono;
|
|
1267
|
+
display: flex;
|
|
1268
|
+
align-items: center;
|
|
1269
|
+
height: var(--code-block-title-height);
|
|
1270
|
+
margin: 0;
|
|
1271
|
+
padding-inline: var(--code-block-pad) var(--code-block-copy-gutter);
|
|
1272
|
+
border-block-end: var(--code-block-border) solid var(--ds-gray-alpha-400);
|
|
1273
|
+
color: var(--ds-gray-900);
|
|
1274
|
+
text-align: start;
|
|
1275
|
+
}
|
|
1276
|
+
[data-slot="code-block"] [data-copy-button] {
|
|
1277
|
+
position: absolute;
|
|
1278
|
+
inset-inline-end: 0.5rem;
|
|
1279
|
+
inset-block-start: calc(
|
|
1280
|
+
var(--code-block-border) + var(--code-block-pad) +
|
|
1281
|
+
(var(--code-block-line) - var(--code-block-copy-size)) / 2
|
|
1282
|
+
);
|
|
1283
|
+
}
|
|
1284
|
+
/* Floating over the code, the button carries the code's own surface so a
|
|
1285
|
+
long first line scrolls under it instead of through it. */
|
|
1286
|
+
[data-slot="code-block"]:not([data-titled]) [data-copy-button] {
|
|
1287
|
+
background-color: var(--shiki-color-background, var(--ds-background-200));
|
|
1288
|
+
}
|
|
1289
|
+
[data-slot="code-block"][data-titled] [data-copy-button] {
|
|
1290
|
+
inset-block-start: calc(
|
|
1291
|
+
(var(--code-block-title-height) - var(--code-block-copy-size)) / 2
|
|
1292
|
+
);
|
|
1293
|
+
}
|
|
1294
|
+
|
|
1295
|
+
/* Line numbers. Shiki wraps every row in a .line span, so the numbers are
|
|
1296
|
+
a counter rather than markup: nothing to select, nothing to copy. The
|
|
1297
|
+
gutter is sticky against the pre's scrollport, so it holds its place
|
|
1298
|
+
while a long line scrolls under it. */
|
|
1299
|
+
[data-slot="code-block"][data-line-numbers] {
|
|
1300
|
+
--code-block-gutter: 3.5rem;
|
|
1301
|
+
}
|
|
1302
|
+
[data-slot="code-block"][data-line-numbers] :where(pre) {
|
|
1303
|
+
/* The gutter and each row carry the inline padding instead. */
|
|
1304
|
+
padding-inline: 0;
|
|
1305
|
+
}
|
|
1306
|
+
[data-slot="code-block"][data-line-numbers] :where(pre code) {
|
|
1307
|
+
display: grid;
|
|
1308
|
+
counter-reset: line;
|
|
1309
|
+
}
|
|
1310
|
+
[data-slot="code-block"][data-line-numbers] :where(pre code > .line) {
|
|
1311
|
+
padding-inline-end: var(--code-block-copy-gutter);
|
|
1312
|
+
}
|
|
1313
|
+
[data-slot="code-block"][data-line-numbers][data-titled]
|
|
1314
|
+
:where(pre code > .line) {
|
|
1315
|
+
padding-inline-end: var(--code-block-pad);
|
|
1316
|
+
}
|
|
1317
|
+
[data-slot="code-block"][data-line-numbers] :where(pre code > .line)::before {
|
|
1318
|
+
content: counter(line);
|
|
1319
|
+
counter-increment: line;
|
|
1320
|
+
position: sticky;
|
|
1321
|
+
inset-inline-start: 0;
|
|
1322
|
+
display: inline-block;
|
|
1323
|
+
width: var(--code-block-gutter);
|
|
1324
|
+
padding-inline-end: var(--code-block-pad);
|
|
1325
|
+
background-color: var(--shiki-color-background, var(--ds-background-200));
|
|
1326
|
+
color: var(--ds-gray-700);
|
|
1327
|
+
text-align: end;
|
|
1328
|
+
user-select: none;
|
|
1329
|
+
-webkit-user-select: none;
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1332
|
+
/* A code block set into another surface (the source under a component
|
|
1333
|
+
preview) is flush: the panel already draws the frame and clips the
|
|
1334
|
+
corners, so the figure drops its own, and a long source scrolls in
|
|
1335
|
+
place instead of stretching the panel. */
|
|
1336
|
+
[data-slot="component-preview-source"] [data-slot="code-block"],
|
|
1337
|
+
[data-slot="component-preview-source"] [data-slot="code-block"][data-titled],
|
|
1338
|
+
[data-slot="component-preview-source"] [data-slot="code-block"] :where(pre) {
|
|
1339
|
+
border-width: 0;
|
|
1340
|
+
border-radius: 0;
|
|
1341
|
+
}
|
|
1342
|
+
[data-slot="component-preview-source"] [data-slot="code-block"] :where(pre) {
|
|
1343
|
+
/* Twenty rows and the block's own padding, so the resting view ends on
|
|
1344
|
+
a whole line rather than halfway through one. */
|
|
1345
|
+
max-height: calc(20 * var(--code-block-line) + 2 * var(--code-block-pad));
|
|
1346
|
+
}
|
|
1347
|
+
|
|
1348
|
+
/* Closed, the source is a three-row teaser: the scrim covers the whole of
|
|
1349
|
+
it and fades into the code's own surface, and View Code sits centred on
|
|
1350
|
+
top. Copying waits until there is something to look at. */
|
|
1351
|
+
[data-slot="component-preview-source"] {
|
|
1352
|
+
--code-collapsed-height: calc(
|
|
1353
|
+
3 * var(--code-block-line) + 2 * var(--code-block-pad)
|
|
1354
|
+
);
|
|
1355
|
+
/* Three rows is too short for a footer: View Code sits in the middle of
|
|
1356
|
+
the fade, over it. */
|
|
1357
|
+
--code-reveal-align: center;
|
|
1358
|
+
--code-reveal-pad: 0;
|
|
1359
|
+
}
|
|
1360
|
+
[data-slot="component-preview-source"] [data-slot="code-collapsible-scrim"] {
|
|
1361
|
+
inset: 0;
|
|
1362
|
+
height: auto;
|
|
1363
|
+
border-radius: 0;
|
|
1364
|
+
background-image: linear-gradient(
|
|
1365
|
+
to top,
|
|
1366
|
+
var(--shiki-color-background, var(--ds-background-200)),
|
|
1367
|
+
color-mix(
|
|
1368
|
+
in oklab,
|
|
1369
|
+
var(--shiki-color-background, var(--ds-background-200)) 60%,
|
|
1370
|
+
transparent
|
|
1371
|
+
)
|
|
1372
|
+
50%,
|
|
1373
|
+
transparent
|
|
1374
|
+
);
|
|
1375
|
+
}
|
|
1376
|
+
/* The teaser keeps the block's own bottom padding: the rows past the
|
|
1377
|
+
third are held back rather than clipped mid-glyph. */
|
|
1378
|
+
[data-slot="component-preview-source"]
|
|
1379
|
+
[data-state="closed"]
|
|
1380
|
+
:where(pre code > .line:nth-child(n + 4)) {
|
|
1381
|
+
visibility: hidden;
|
|
1382
|
+
}
|
|
1383
|
+
[data-slot="component-preview-source"]
|
|
1384
|
+
[data-state="closed"]
|
|
1385
|
+
[data-copy-button] {
|
|
1386
|
+
/* visibility, not display: the button's own utilities set that. */
|
|
1387
|
+
visibility: hidden;
|
|
1388
|
+
}
|
|
1389
|
+
[data-slot="component-preview-source"]
|
|
1390
|
+
[data-state="open"]
|
|
1391
|
+
[data-slot="code-collapsible-footer"] {
|
|
1392
|
+
margin-block: var(--code-block-pad);
|
|
1393
|
+
}
|
|
1394
|
+
}
|
|
1395
|
+
|
|
1396
|
+
@utility extend-touch-target {
|
|
1397
|
+
@media (pointer: coarse) {
|
|
1398
|
+
@apply relative touch-manipulation after:absolute after:-inset-2;
|
|
1399
|
+
}
|
|
1400
|
+
}
|