1 const plugin = require("tailwindcss/plugin")
2 const presets = require("./theme-presets")
3
4 /** @type {import('tailwindcss').Config} */
5 module.exports = {
6 presets: [require("@medusajs/ui-preset")],
7 darkMode: ["class", `[data-theme="dark"]`],
8 theme: {
9 extend: {
10 colors: {
11 /* docs colors */
12 medusa: {
13 bg: {
14 subtle: {
15 DEFAULT: "var(--docs-bg-subtle)",
16 hover: "var(--docs-bg-subtle-hover)",
17 pressed: "var(--docs-bg-subtle-pressed)",
18 },
19 base: {
20 DEFAULT: "var(--docs-bg-base)",
21 hover: "var(--docs-bg-base-hover)",
22 pressed: "var(--docs-bg-base-pressed)",
23 },
24 component: {
25 DEFAULT: "var(--docs-bg-component)",
26 hover: "var(--docs-bg-component-hover)",
27 pressed: "var(--docs-bg-component-pressed)",
28 },
29 "switch-off": {
30 DEFAULT: "var(--docs-bg-switch-off)",
31 hover: "var(--docs-bg-switch-off-hover)",
32 },
33 interactive: "var(--docs-bg-interactive)",
34 overlay: "var(--docs-bg-overlay)",
35 disabled: "var(--docs-bg-disabled)",
36 highlight: {
37 DEFAULT: "var(--docs-bg-highlight)",
38 hover: "var(--docs-bg-highlight-hover)",
39 },
40 field: {
41 DEFAULT: "var(--docs-bg-field)",
42 hover: "var(--docs-bg-field-hover)",
43 component: {
44 DEFAULT: "var(--docs-bg-field-component)",
45 hover: "var(--docs-bg-field-component-hover)",
46 },
47 },
48 },
49 fg: {
50 base: "var(--docs-fg-base)",
51 subtle: "var(--docs-fg-subtle)",
52 muted: "var(--docs-fg-muted)",
53 disabled: "var(--docs-fg-disabled)",
54 on: {
55 color: "var(--docs-fg-on-color)",
56 inverted: "var(--docs-fg-on-inverted)",
57 },
58 interactive: {
59 DEFAULT: "var(--docs-fg-interactive)",
60 hover: "var(--docs-fg-interactive-hover)",
61 },
62 error: "var(--docs-fg-error)",
63 },
64 border: {
65 base: "var(--docs-border-base)",
66 strong: "var(--docs-border-strong)",
67 interactive: "var(--docs-border-interactive)",
68 error: "var(--docs-border-error)",
69 danger: "var(--docs-border-danger)",
70 transparent: "var(--docs-border-transparent)",
71 menu: {
72 top: "var(--docs-border-menu-top)",
73 },
74 },
75 button: {
76 inverted: {
77 DEFAULT: "var(--docs-button-inverted)",
78 hover: "var(--docs-button-inverted-hover)",
79 pressed: "var(--docs-button-inverted-pressed)",
80 },
81 neutral: {
82 DEFAULT: "var(--docs-button-neutral)",
83 hover: "var(--docs-button-neutral-hover)",
84 pressed: "var(--docs-button-neutral-pressed)",
85 },
86 danger: {
87 DEFAULT: "var(--docs-button-danger)",
88 hover: "var(--docs-button-danger-hover)",
89 pressed: "var(--docs-button-danger-pressed)",
90 },
91 transparent: {
92 DEFAULT: "var(--docs-button-transparent)",
93 hover: "var(--docs-button-transparent-hover)",
94 pressed: "var(--docs-button-transparent-pressed)",
95 },
96 },
97 tag: {
98 neutral: {
99 bg: {
100 DEFAULT: "var(--docs-tags-neutral-bg)",
101 hover: "var(--docs-tags-neutral-bg-hover)",
102 },
103 text: "var(--docs-tags-neutral-text)",
104 icon: "var(--docs-tags-neutral-icon)",
105 border: "var(--docs-tags-neutral-border)",
106 },
107 purple: {
108 bg: {
109 DEFAULT: "var(--docs-tags-purple-bg)",
110 hover: "var(--docs-tags-purple-bg-hover)",
111 },
112 text: "var(--docs-tags-purple-text)",
113 icon: "var(--docs-tags-purple-icon)",
114 border: "var(--docs-tags-purple-border)",
115 },
116 blue: {
117 bg: {
118 DEFAULT: "var(--docs-tags-blue-bg)",
119 hover: "var(--docs-tags-blue-bg-hover)",
120 },
121 text: "var(--docs-tags-blue-text)",
122 icon: "var(--docs-tags-blue-icon)",
123 border: "var(--docs-tags-blue-border)",
124 },
125 green: {
126 bg: {
127 DEFAULT: "var(--docs-tags-green-bg)",
128 hover: "var(--docs-tags-green-bg-hover)",
129 },
130 text: "var(--docs-tags-green-text)",
131 icon: "var(--docs-tags-green-icon)",
132 border: "var(--docs-tags-green-border)",
133 },
134 orange: {
135 bg: {
136 DEFAULT: "var(--docs-tags-orange-bg)",
137 hover: "var(--docs-tags-orange-bg-hover)",
138 },
139 text: "var(--docs-tags-orange-text)",
140 icon: "var(--docs-tags-orange-icon)",
141 border: "var(--docs-tags-orange-border)",
142 },
143 red: {
144 bg: {
145 DEFAULT: "var(--docs-tags-red-bg)",
146 hover: "var(--docs-tags-red-bg-hover)",
147 },
148 text: "var(--docs-tags-red-text)",
149 icon: "var(--docs-tags-red-icon)",
150 border: "var(--docs-tags-red-border)",
151 },
152 },
153 code: {
154 bg: {
155 base: {
156 DEFAULT: "var(--docs-code-bg-base)",
157 },
158 header: "var(--docs-code-bg-header)",
159 },
160 border: "var(--docs-code-border)",
161 },
162 contrast: {
163 bg: {
164 base: {
165 DEFAULT: "var(--docs-contrast-bg-base)",
166 pressed: "var(--docs-contrast-bg-base-pressed)",
167 hover: "var(--docs-contrast-bg-base-hover)",
168 },
169 subtle: "var(--docs-contrast-bg-subtle)",
170 highlight: "var(--docs-contrast-bg-highlight)",
171 alpha: "var(--docs-contrast-bg-alpha)",
172 },
173 fg: {
174 primary: "var(--docs-contrast-fg-primary)",
175 secondary: "var(--docs-contrast-fg-secondary)",
176 },
177 border: {
178 base: "var(--docs-contrast-border-base)",
179 top: "var(--docs-contrast-border-top)",
180 bot: "var(--docs-contrast-border-bot)",
181 },
182 // not in UI but necessary for show more button
183 button: {
184 DEFAULT: "#3D3D3F",
185 hover: "#505052",
186 },
187 },
188 alpha: {
189 white: {
190 alpha: {
191 6: "var(--docs-alpha-white-alpha-6)",
192 12: "var(--docs-alpha-white-alpha-12)",
193 },
194 },
195 },
196 alphas: {
197 alpha: {
198 250: "var(--docs-alphas-alpha-250)",
199 6: "var(--docs-alphas-alpha-6)",
200 16: "var(--docs-alphas-alpha-16)",
201 10: "var(--docs-alphas-alpha-10)",
202 24: "var(--docs-alphas-alpha-24)",
203 }
204 }
205 },
206 },
207 boxShadow: {
208 "elevation-card-rest":
209 "0px 0px 0px 1px rgba(0, 0, 0, 0.08), 0px 1px 2px -1px rgba(0, 0, 0, 0.08), 0px 2px 4px 0px rgba(0, 0, 0, 0.04)",
210 "elevation-card-rest-dark":
211 "0px -1px 0px 0px rgba(255, 255, 255, 0.06), 0px 0px 0px 1px rgba(255, 255, 255, 0.06), 0px 0px 0px 1px #27272A, 0px 1px 2px 0px rgba(0, 0, 0, 0.32), 0px 2px 4px 0px rgba(0, 0, 0, 0.32)",
212 "elevation-card-hover":
213 "0px 0px 0px 1px rgba(0, 0, 0, 0.08), 0px 1px 2px -1px rgba(0, 0, 0, 0.08), 0px 2px 8px 0px rgba(0, 0, 0, 0.10)",
214 "elevation-card-hover-dark":
215 "0px -1px 0px 0px rgba(255, 255, 255, 0.06), 0px 0px 0px 1px rgba(255, 255, 255, 0.06), 0px 0px 0px 1px #27272A, 0px 1px 4px 0px rgba(0, 0, 0, 0.48), 0px 2px 8px 0px rgba(0, 0, 0, 0.48)",
216 "elevation-tooltip":
217 "0px 0px 0px 1px rgba(0, 0, 0, 0.08), 0px 2px 4px 0px rgba(0, 0, 0, 0.08), 0px 4px 8px 0px rgba(0, 0, 0, 0.08)",
218 "elevation-tooltip-dark":
219 "0px -1px 0px 0px rgba(255, 255, 255, 0.04), 0px 0px 0px 1px rgba(255, 255, 255, 0.10), 0px 2px 4px 0px rgba(0, 0, 0, 0.32), 0px 4px 8px 0px rgba(0, 0, 0, 0.32)",
220 "elevation-flyout":
221 "0px 0px 0px 1px rgba(0, 0, 0, 0.08), 0px 4px 8px 0px rgba(0, 0, 0, 0.08), 0px 8px 16px 0px rgba(0, 0, 0, 0.08)",
222 "elevation-flyout-dark":
223 "0px -1px 0px 0px rgba(255, 255, 255, 0.04), 0px 0px 0px 1px rgba(255, 255, 255, 0.10), 0px 4px 8px 0px rgba(0, 0, 0, 0.32), 0px 8px 16px 0px rgba(0, 0, 0, 0.32)",
224 "elevation-modal":
225 "0px 0px 0px 1px #FFF inset, 0px 0px 0px 1.5px rgba(228, 228, 231, 0.60) inset, 0px 0px 0px 1px rgba(0, 0, 0, 0.08), 0px 8px 16px 0px rgba(0, 0, 0, 0.08), 0px 16px 32px 0px rgba(0, 0, 0, 0.08)",
226 "elevation-modal-dark":
227 "0px 0px 0px 1px #18181B inset, 0px 0px 0px 1.5px rgba(255, 255, 255, 0.06) inset, 0px -1px 0px 0px rgba(255, 255, 255, 0.04), 0px 0px 0px 1px rgba(255, 255, 255, 0.10), 0px 4px 8px 0px rgba(0, 0, 0, 0.32), 0px 8px 16px 0px rgba(0, 0, 0, 0.32)",
228 "button-neutral":
229 "0 1px 2px 0 rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.08)",
230 "button-neutral-dark":
231 "0px -1px 0px 0px rgba(255, 255, 255, 0.06), 0px 0px 0px 1px rgba(255, 255, 255, 0.06), 0px 0px 0px 1px rgba(39, 39, 42, 1), 0px 0px 1px 1.5px rgba(0, 0, 0, 0.24), 0px 2px 2px 0px rgba(0, 0, 0, 0.24)",
232 "button-neutral-focused":
233 "0px 1px 2px 0px rgba(0, 0, 0, 0.12), 0px 0px 0px 1px rgba(0, 0, 0, 0.08), 0px 0px 0px 2px rgba(255, 255, 255, 1), 0px 0px 0px 4px rgba(59, 130, 246, 0.6)",
234 "button-neutral-focused-dark":
235 "0px -1px 0px 0px rgba(255, 255, 255, 0.06), 0px 0px 0px 1px rgba(255, 255, 255, 0.06), 0px 0px 0px 1px rgba(39, 39, 42, 1), 0px 0px 0px 2px rgba(24, 24, 27, 1), 0px 0px 0px 4px rgba(96, 165, 250, 0.8)",
236 "button-danger":
237 "0px 0.75px 0px 0px rgba(255, 255, 255, 0.2) inset, 0px 1px 2px 0px rgba(190, 18, 60, 0.4), 0px 0px 0px 1px rgba(190, 18, 60, 1)",
238 "button-danger-dark":
239 "0px -1px 0px 0px rgba(255, 255, 255, 0.16), 0px 0px 0px 1px rgba(255, 255, 255, 0.12), 0px 0px 0px 1px rgba(159, 18, 57, 1), 0px 0px 1px 1.5px rgba(0, 0, 0, 0.24), 0px 2px 2px 0px rgba(0, 0, 0, 0.24)",
240 "button-danger-focused":
241 "0px 0.75px 0px 0px rgba(255, 255, 255, 0.2) inset, 0px 1px 2px 0px rgba(190, 18, 60, 0.4), 0px 0px 0px 1px rgba(190, 18, 60, 1), 0px 0px 0px 2px rgba(255, 255, 255, 1), 0px 0px 0px 4px rgba(59, 130, 246, 0.6)",
242 "button-danger-focused-dark":
243 "0px -1px 0px 0px rgba(255, 255, 255, 0.16), 0px 0px 0px 1px rgba(255, 255, 255, 0.12), 0px 0px 0px 1px rgba(159, 18, 57, 1), 0px 0px 0px 2px rgba(24, 24, 27, 1), 0px 0px 0px 4px rgba(96, 165, 250, 0.8)",
244 "button-inverted":
245 "0px 0.75px 0px 0px rgba(255, 255, 255, 0.2) inset, 0px 1px 2px 0px rgba(0, 0, 0, 0.4), 0px 0px 0px 1px rgba(24, 24, 27, 1)",
246 "button-inverted-dark":
247 "0px -1px 0px 0px rgba(255, 255, 255, 0.12), 0px 0px 0px 1px rgba(255, 255, 255, 0.1), 0px 0px 0px 1px rgba(82, 82, 91, 1), 0px 0px 1px 1.5px rgba(0, 0, 0, 0.24), 0px 2px 2px 0px rgba(0, 0, 0, 0.24)",
248 "button-inverted-focused":
249 "0px 0.75px 0px 0px rgba(255, 255, 255, 0.2) inset, 0px 1px 2px 0px rgba(0, 0, 0, 0.4), 0px 0px 0px 1px rgba(24, 24, 27, 1), 0px 0px 0px 2px rgba(255, 255, 255, 1), 0px 0px 0px 4px rgba(59, 130, 246, 0.6)",
250 "button-inverted-focused-dark":
251 "0px -1px 0px 0px rgba(255, 255, 255, 0.12), 0px 0px 0px 1px rgba(255, 255, 255, 0.12), 0px 0px 0px 1px rgba(82, 82, 91, 1), 0px 0px 0px 2px rgba(24, 24, 27, 1), 0px 0px 0px 4px rgba(96, 165, 250, 0.8)",
252
253 "elevation-code-block":
254 "0px 0px 0px 1px #18181B inset, 0px 0px 0px 1.5px rgba(255, 255, 255, 0.20) inset",
255 "elevation-code-block-dark":
256 "0px -1px 0px 0px rgba(255, 255, 255, 0.06), 0px 0px 0px 1px rgba(255, 255, 255, 0.06), 0px 0px 0px 1px #27272A, 0px 1px 2px 0px rgba(0, 0, 0, 0.32), 0px 2px 4px 0px rgba(0, 0, 0, 0.32)",
257 active: "0px 0px 0px 3px #E1F0FF",
258 "active-dark": "0px 0px 0px 3px #2C2250",
259 "border-base":
260 "0px 1px 2px 0px rgba(0, 0, 0, 0.12), 0px 0px 0px 1px rgba(0, 0, 0, 0.08)",
261 "border-base-dark":
262 "0px -1px 0px 0px rgba(255, 255, 255, 0.06), 0px 0px 0px 1px rgba(255, 255, 255, 0.06), 0px 0px 0px 1px rgba(39, 39, 42, 1), 0px 0px 1px 1.5px rgba(0, 0, 0, 0.24), 0px 2px 2px 0px rgba(0, 0, 0, 0.24)",
263 },
264 borderRadius: {
265 xxs: "2px",
266 xs: "4px",
267 sm: "6px",
268 DEFAULT: "8px",
269 md: "8px",
270 lg: "12px",
271 xl: "16px",
272 },
273 lineHeight: {
274 DEFAULT: "24px",
275 },
276 backgroundImage: {
277 "code-fade-top-to-bottom": `linear-gradient(180deg, #27272A 0%, rgba(39, 39, 42, 0.00) 100%)`,
278 "code-fade-bottom-to-top": `linear-gradient(180deg, rgba(39, 39, 42, 0.00) 0%, #27272A 100%)`,
279 "base-code-fade-right-to-left": `linear-gradient(90deg, #18181b7d, #18181B)`,
280 "subtle-code-fade-right-to-left": `linear-gradient(90deg, #27272aa3, #27272A)`,
281 "code-fade-top-to-bottom-dark": `linear-gradient(180deg, #2F2F32 0%, rgba(47, 47, 50, 0.00) 100%)`,
282 "code-fade-bottom-to-top-dark": `linear-gradient(180deg, rgba(47, 47, 50, 0.00) 0%, #2F2F32 100%)`,
283 "base-code-fade-right-to-left-dark": `linear-gradient(90deg, #27272aa3, #27272A)`,
284 "subtle-code-fade-right-to-left-dark": `linear-gradient(90deg, #30303380, #303033)`,
285 "border-dotted":
286 "linear-gradient(90deg,var(--docs-border-strong) 1px,transparent 1px)",
287 "border-dotted-disabled":
288 "linear-gradient(90deg,var(--docs-fg-disabled) 1px,transparent 1px)",
289 "border-dotted-disabled-vertical":
290 "linear-gradient(180deg,var(--docs-fg-disabled) 1px,transparent 1px)",
291 "ai-assistant-bottom":
292 "linear-gradient(180deg, rgba(255, 255, 255, 0.00) 0%, var(--docs-bg-base) 100%)",
293 "bg-bloom-callout": "linear-gradient(90deg, var(--docs-tags-orange-bg) 0%, var(--docs-tags-red-bg) 33%, var(--docs-tags-purple-bg) 66%, var(--docs-tags-blue-bg) 100%)",
294 "bg-bloom-callout-text": "linear-gradient(90deg, var(--docs-tags-orange-text) 0%, var(--docs-tags-red-text) 33%, var(--docs-tags-purple-text) 66%, var(--docs-tags-blue-text) 100%)",
295 },
296 screens: {
297 xs: "568px",
298 sm: "640px",
299 md: "768px",
300 lg: "1024px",
301 xl: "1280px",
302 xxl: "1536px",
303 xxxl: "1800px",
304 xxxxl: "3840px",
305 },
306 transitionTimingFunction: {
307 ease: "ease",
308 },
309 width: {
310 toc: "221px",
311 "sidebar-xs": "calc(100% - 20px)",
312 "ai-assistant": "500px"
313 },
314 maxWidth: {
315 // sidebar
316 "sidebar-xs": "calc(100% - 20px)",
317 "sidebar-sm": "300px",
318 "sidebar-md": "300px",
319 "sidebar-lg": "221px",
320 "sidebar-xl": "221px",
321 "sidebar-xxl": "221px",
322 "sidebar-xxxl": "221px",
323 // main content
324 "main-content-xs": "100%",
325 "main-content-sm": "100%",
326 "main-content-md": "100%",
327 "main-content-lg": "751px",
328 "main-content-xl": "1007px",
329 "main-content-xxl": "1263px",
330 "main-content-xxxl": "3567px",
331 // inner content
332 "inner-content-xs": "100%",
333 "inner-content-sm": "100%",
334 "inner-content-md": "100%",
335 "inner-content-lg": "550px",
336 "inner-content-xl": "640px",
337 "inner-content-xxl": "640px",
338 "inner-content-xxxl": "640px",
339 // wide layout
340 "wide-content": "1112px",
341 "xl-wide-content": "1112px",
342 "lg-wide-content": "800px",
343 // modal
344 "modal-xs": "304px",
345 "modal-sm": "624px",
346 "modal-md": "752px",
347 "modal-lg": "640px",
348 // ai-assistant
349 "ai-assistant": "500px"
350 },
351 minWidth: {
352 xl: "1419px",
353 },
354 fontSize: {
355 display: [
356 "44px",
357 {
358 lineHeight: "110%",
359 fontWeight: "500",
360 }
361 ],
362 h1: [
363 "24px",
364 {
365 lineHeight: "125%",
366 fontWeight: "500",
367 },
368 ],
369 h2: [
370 "18px",
371 {
372 lineHeight: "160%",
373 fontWeight: "500",
374 },
375 ],
376 h3: [
377 "16px",
378 {
379 lineHeight: "160%",
380 fontWeight: "500",
381 },
382 ],
383 h4: [
384 "14px",
385 {
386 lineHeight: "160%",
387 fontWeight: "500",
388 },
389 ],
390 "compact-x-large-plus": [
391 "18px",
392 {
393 lineHeight: "20px",
394 fontWeight: "500",
395 },
396 ],
397 "compact-x-large": [
398 "18px",
399 {
400 lineHeight: "20px",
401 fontWeight: "400",
402 },
403 ],
404 "compact-large-plus": [
405 "16px",
406 {
407 lineHeight: "20px",
408 fontWeight: "500",
409 },
410 ],
411 "compact-large": [
412 "16px",
413 {
414 lineHeight: "20px",
415 fontWeight: "400",
416 },
417 ],
418 "compact-medium-plus": [
419 "14px",
420 {
421 lineHeight: "20px",
422 fontWeight: "500",
423 },
424 ],
425 "compact-medium": [
426 "14px",
427 {
428 lineHeight: "20px",
429 fontWeight: "400",
430 },
431 ],
432 "compact-small-plus": [
433 "13px",
434 {
435 lineHeight: "20px",
436 fontWeight: "500",
437 },
438 ],
439 "compact-small": [
440 "13px",
441 {
442 lineHeight: "20px",
443 fontWeight: "400",
444 },
445 ],
446 "compact-x-small-plus": [
447 "12px",
448 {
449 lineHeight: "20px",
450 fontWeight: "500",
451 },
452 ],
453 "compact-x-small": [
454 "12px",
455 {
456 lineHeight: "20px",
457 fontWeight: "400",
458 },
459 ],
460 "x-large-plus": [
461 "18px",
462 {
463 lineHeight: "150%",
464 fontWeight: "500",
465 },
466 ],
467 "x-large": [
468 "18px",
469 {
470 lineHeight: "150%",
471 fontWeight: "400",
472 },
473 ],
474 "large-plus": [
475 "16px",
476 {
477 lineHeight: "150%",
478 fontWeight: "500",
479 },
480 ],
481 large: [
482 "16px",
483 {
484 lineHeight: "150%",
485 fontWeight: "400",
486 },
487 ],
488 "medium-plus": [
489 "14px",
490 {
491 lineHeight: "160%",
492 fontWeight: "500",
493 },
494 ],
495 medium: [
496 "14px",
497 {
498 lineHeight: "160%",
499 fontWeight: "400",
500 },
501 ],
502 small: [
503 "13px",
504 {
505 lineHeight: "150%",
506 fontWeight: "400",
507 },
508 ],
509 "small-plus": [
510 "13px",
511 {
512 lineHeight: "150%",
513 fontWeight: "500",
514 },
515 ],
516 "x-small": [
517 "12px",
518 {
519 lineHeight: "150%",
520 fontWeight: "400",
521 },
522 ],
523 "x-small-plus": [
524 "12px",
525 {
526 lineHeight: "150%",
527 fontWeight: "500",
528 },
529 ],
530 "2x-small-plus": [
531 "11px",
532 {
533 lineHeight: "160%",
534 fontWeight: "500",
535 },
536 ],
537 "code-label": [
538 "12px",
539 {
540 lineHeight: "15px",
541 fontWeight: "500",
542 },
543 ],
544 "code-body": [
545 "12px",
546 {
547 lineHeight: "150%",
548 fontWeight: "400",
549 },
550 ],
551 "code-paragraph-xsmall-plus": [
552 "12px",
553 {
554 lineHeight: "160%",
555 fontWeight: "500",
556 }
557 ],
558 "code-paragraph-xsmall": [
559 "12px",
560 {
561 lineHeight: "160%",
562 fontWeight: "400",
563 }
564 ],
565 "code-paragraph-2xsmall": [
566 "11px",
567 {
568 lineHeight: "160%",
569 fontWeight: "400",
570 }
571 ]
572 },
573 keyframes: {
574 fadeIn: {
575 from: { opacity: 0 },
576 to: { opacity: 1 },
577 },
578 fadeOut: {
579 from: { opacity: 1 },
580 to: { opacity: 0 },
581 },
582 tada: {
583 from: {
584 transform: "scale3d(1, 1, 1)",
585 },
586 "10%, 20%": {
587 transform: "scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg)",
588 },
589 "30%, 50%, 70%, 90%": {
590 transform: "scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg)",
591 },
592 "40%, 60%, 80%": {
593 transform: "scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg)",
594 },
595 to: {
596 transform: "scale3d(1, 1, 1)",
597 },
598 },
599 fadeInDown: {
600 from: {
601 opacity: "0",
602 transform: "translate3d(0, -100%, 0)",
603 },
604 to: {
605 opacity: "1",
606 transform: "translate3d(0, 0, 0)",
607 },
608 },
609 fadeInLeft: {
610 from: {
611 opacity: "0",
612 transform: "translate3d(-100%, 0, 0)",
613 },
614 to: {
615 opacity: "1",
616 transform: "translate3d(0, 0, 0)",
617 },
618 },
619 fadeInRight: {
620 from: {
621 opacity: "0",
622 transform: "translate3d(100%, 0, 0)",
623 },
624 to: {
625 opacity: "1",
626 transform: "translate3d(0, 0, 0)",
627 },
628 },
629 fadeOutUp: {
630 from: {
631 opacity: "1",
632 },
633 to: {
634 opacity: "0",
635 transform: "translate3d(0, -100%, 0)",
636 },
637 },
638 fadeOutLeft: {
639 from: {
640 opacity: "1",
641 },
642 to: {
643 opacity: "0",
644 transform: "translate3d(-100%, 0, 0)",
645 },
646 },
647 fadeOutRight: {
648 from: {
649 opacity: "1",
650 },
651 to: {
652 opacity: "0",
653 transform: "translate3d(100%, 0, 0)",
654 },
655 },
656 slideInRight: {
657 from: {
658 transform: "translate3d(100%, 0, 0)",
659 visibility: "visible",
660 },
661 to: {
662 transform: "translate3d(0, 0, 0)",
663 },
664 },
665 slideOutRight: {
666 from: {
667 transform: "translate3d(0, 0, 0)",
668 },
669 to: {
670 visibility: "hidden",
671 transform: "translate3d(100%, 0, 0)",
672 },
673 },
674 slideInLeft: {
675 from: {
676 transform: "translate3d(-100%, 0, 0)",
677 visibility: "visible",
678 },
679 to: {
680 transform: "translate3d(0, 0, 0)",
681 },
682 },
683 slideOutLeft: {
684 from: {
685 transform: "translate3d(0, 0, 0)",
686 },
687 to: {
688 visibility: "hidden",
689 transform: "translate3d(-100%, 0, 0)",
690 },
691 },
692 pulsingDots: {
693 "0%": {
694 opacity: 1,
695 },
696 "100%": {
697 opacity: 0.3,
698 },
699 },
700 pulsingCursor: {
701 "50%": {
702 opacity: 0,
703 },
704 },
705 minimize: {
706 from: {
707 transform: "scale(1)",
708 },
709 to: {
710 transform: "scale(0)",
711 },
712 },
713 maximize: {
714 from: {
715 transform: "scale(0)",
716 },
717 to: {
718 transform: "scale(1)",
719 },
720 },
721 flash: {
722 "0%": {
723 backgroundColor: "transparent",
724 },
725 "50%": {
726 backgroundColor: "var(--animation-color)",
727 },
728 "100%": {
729 backgroundColor: "transparent",
730 },
731 },
732 slideInDown: {
733 from: {
734 transform: "translate3d(0, -100%, 0)",
735 visibility: "visible",
736 },
737 to: {
738 transform: "translate3d(0, 0, 0)",
739 },
740 },
741 slideOutUp: {
742 from: {
743 transform: "translate3d(0, 0, 0)",
744 },
745 to: {
746 transform: "translate3d(0, -100%, 0)",
747 visibility: "hidden",
748 },
749 },
750 growWidth: {
751 from: {
752 width: 0,
753 },
754 to: {
755 width: "100%",
756 },
757 },
758 },
759 animation: {
760 fadeIn: "fadeIn 500ms",
761 fadeOut: "fadeOut 500ms",
762 fadeInDown: "fadeInDown 500ms",
763 fadeInLeft: "fadeInLeft 500ms",
764 fadeInRight: "fadeInRight 500ms",
765 fadeOutUp: "fadeOutUp 500ms",
766 fadeOutLeft: "fadeOutLeft 500ms",
767 fadeOutRight: "fadeOutRight 500ms",
768 tada: "tada 1s",
769 slideInRight: "slideInRight 500ms",
770 slideOutRight: "slideOutRight 150ms",
771 slideOutUp: "slideOutUp 500ms",
772 slideInLeft: "slideInLeft 500ms",
773 slideOutLeft: "slideOutLeft 500ms",
774 slideInDown: "slideInDown 150ms",
775 pulsingDots: "pulsingDots 1s alternate infinite",
776 minimize: "minimize 500ms",
777 maximize: "maximize 500ms",
778 flash: "flash 1500ms 1",
779 growWidth: "growWidth 500ms",
780 },
781 scrollMargin: {
782 56: "56px",
783 },
784 },
785 fontFamily: {
786 base: [
787 "var(--font-inter)",
788 "Inter",
789 "BlinkMacSystemFont",
790 "-apple-system",
791 "Segoe UI",
792 "Roboto",
793 "Oxygen",
794 "Ubuntu",
795 "Cantarell",
796 "Fira Sans",
797 "Droid Sans",
798 "Helvetica Neue",
799 "Helvetica",
800 "Arial",
801 "sans-serif",
802 ],
803 monospace: [
804 "var(--font-roboto-mono)",
805 "Roboto Mono",
806 "SFMono-Regular",
807 "Menlo",
808 "Monaco",
809 "Consolas",
810 "Liberation Mono",
811 "Courier New",
812 "monospace",
813 ],
814 },
815 spacing: {
816 px: "1px",
817 0: "0px",
818 0.125: "2px",
819 0.25: "4px",
820 0.4: "7px",
821 0.5: "8px",
822 0.75: "12px",
823 1: "16px",
824 1.5: "24px",
825 2: "32px",
826 2.5: "40px",
827 3: "48px",
828 4: "64px",
829 5: "80px",
830 6: "96px",
831 7: "112px",
832 8: "128px",
833 },
834 backgroundImage: {
835 "large-card": "url('/img/squares-bg-light.svg')",
836 "large-card-dark": "url('/img/squares-bg.svg')",
837 "large-card-fade":
838 "linear-gradient(transparent, url('/img/squares-bg-light.svg'))",
839 "large-card-fade-dark":
840 "linear-gradient(transparent, url('/img/squares-bg.svg'))",
841 "large-card-fade-hover": "linear-gradient(transparent, #1C1C1F)",
842 "large-card-fade-hover-dark": "linear-gradient(transparent, #232326)",
843 "announcement-bg": "url('/img/announcement-bg.svg')",
844 "card-highlighted": "url('/img/small-squares-bg-light.svg')",
845 "card-highlighted-dark": "url('/img/small-squares-bg.svg')",
846 "search-hit": "url('/img/search-hit-light.svg')",
847 "search-hit-dark": "url('/img/search-hit.svg')",
848 "search-arrow": "url('/img/search-hit-arrow-light.svg')",
849 "search-arrow-dark": "url('/img/search-hit-arrow.svg')",
850 "search-no-result": "url('/img/search-no-result-light.svg')",
851 "search-no-result-dark": "url('/img/search-no-result.svg')",
852 "magnifying-glass": "url('/img/magnifying-glass.svg')",
853 "magnifying-glass-dark": "url('/img/magnifying-glass-dark.svg')",
854 toc: "url('/img/side-menu-light.svg')",
855 "toc-dark": "url('/img/side-menu.svg')",
856 },
857 },
858 animationDelay: {
859 0: "0ms",
860 200: "200ms",
861 400: "400ms",
862 },
863 plugins: [
864 plugin(
865 ({
866 addBase,
867 addVariant,
868 addUtilities,
869 addComponents,
870 matchUtilities,
871 theme,
872 }) => {
873 addBase(presets)
874 addVariant("search-cancel", "&::-webkit-search-cancel-button")
875 addUtilities({
876 ".animation-fill-forwards": {
877 animationFillMode: "forwards",
878 },
879 ".animate-fast": {
880 animationDuration: "300ms",
881 },
882 ".animate-fastest": {
883 animationDuration: "150ms",
884 },
885 ".clip": {
886 clipPath: "inset(0)",
887 },
888 ".no-marker": {
889 "&::-webkit-details-marker": {
890 display: "none",
891 },
892 },
893 ".flip-y": {
894 transform: "rotateY(180deg)",
895 },
896 ".animate-bg-surface": {
897 "--animation-color": "var(--docs-bg-subtle-pressed)",
898 },
899 ".code-block-highlight": {
900 "*::selection": {
901 "background-color": "var(--docs-contrast-fg-secondary) !important",
902 color: "var(--docs-contrast-bg-base)",
903 },
904 },
905 ".code-block-highlight-light": {
906 "*::selection": {
907 "background-color": "var(--docs-code-subtle-highlight-bg) !important",
908 color: "var(--docs-code-subtle-highlight-text)",
909 },
910 },
911 ".badge": {
912 "&::selection": {
913 "background-color": "var(--docs-bg-highlight)",
914 },
915 },
916 })
917 addComponents({
918 ".btn-secondary-icon": {
919 padding: "4px !important",
920 },
921 "btn-clear": {
922 backgroundColor: "transparent",
923 boxShadow: theme("shadow.none"),
924 borderWidth: 0,
925 borderColor: "transparent",
926 outlineColor: "transparent",
927 cursor: "pointer",
928 },
929 ".grecaptcha-badge": {
930 visibility: "hidden",
931 },
932 })
933
934 matchUtilities(
935 {
936 "animation-delay": (value) => ({
937 animationDelay: value,
938 }),
939 },
940 { values: theme("animationDelay") }
941 )
942 }
943 ),
944 ],
945 }