-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathtailwind.config.cjs
87 lines (86 loc) · 2.9 KB
/
tailwind.config.cjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/** @type {import('tailwindcss').Config} */
module.exports = {
darkMode: 'class',
content: ['./src/**/*.{md,html,astro,svelte}'],
experimental: {
optimizeUniversalDefaults: true,
},
future: {
hoverOnlyWhenSupported: true,
},
theme: {
fontFamily: {
sans: ['var(--font-family-sans)'],
mono: ['var(--font-family-mono)'],
},
screens: {
420: '420px',
576: '576px',
768: '768px',
992: '992px',
1200: '1200px',
1280: '1280px',
1400: '1400px',
1440: '1440px',
1460: '1460px',
1480: '1480px',
'nav-lg': '825px',
},
extend: {
height: { screen: ['100vh', '100dvh'] },
minHeight: { screen: ['100vh', '100dvh'] },
maxHeight: { screen: ['100vh', '100dvh'] },
colors: {
brand: 'rgb(var(--color-brand) / <alpha-value>)',
secondary: 'rgb(var(--color-secondary) / <alpha-value>)',
focus: 'rgb(var(--color-focus) / <alpha-value>)',
gray: {},
border: 'rgb(var(--color-border) / <alpha-value>)',
soft: 'rgb(var(--color-soft) / <alpha-value>)',
inverse: 'rgb(var(--color-inverse) / <alpha-value>)',
body: 'rgb(var(--color-body) / <alpha-value>)',
elevate: 'rgb(var(--color-elevate) / <alpha-value>)',
'code-tag': 'rgb(var(--color-code-tag) / <alpha-value>)',
'code-fn': 'rgb(var(--color-code-fn) / <alpha-value>)',
},
animation: {
indeterminate: 'indeterminate 1.2s linear infinite',
levitate: 'levitate 6s linear infinite',
},
keyframes: {
levitate: {
'0%': { transform: 'translateY(0)' },
'20%': { transform: 'translateX(-5px) translateY(-5px)' },
'40%': { transform: 'translateX(0) translateY(5px)' },
'60%': { transform: 'translateX(5px)' },
'80%': { transform: 'translateX(0) translateY(-5px)' },
'100%': { transform: 'translateY(0)' },
},
shimmer: { '100%': { transform: 'translateX(100%)' } },
indeterminate: {
'0%': { transform: 'translateX(0) scaleX(0)' },
'40%': { transform: 'translateX(0) scaleX(0.4)' },
'100%': { transform: 'translateX(100%) scaleX(0.5)' },
},
},
},
},
plugins: [
require('@tailwindcss/container-queries'),
require('tailwindcss-animate'),
require('vidstack/tailwind.cjs'),
customVariants,
],
};
function customVariants({ addVariant, matchVariant }) {
addVariant(
'supports-backdrop-blur',
'@supports (backdrop-filter: blur(0)) or (-webkit-backdrop-filter: blur(0))',
);
addVariant('child', '& > *');
addVariant('first-child', '& > *:first-child');
addVariant('hocus', ['&:hover', '&:focus-visible']);
addVariant('scrolled', ['body[data-scrolled] &']);
addVariant('group-hocus', ['.group:hover &', '.group:focus-visible &']);
matchVariant('parent-aria', (value) => `.parent[aria-${value}="true"] > &`);
}