-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathtailwind.config.ts
More file actions
66 lines (62 loc) · 1.65 KB
/
tailwind.config.ts
File metadata and controls
66 lines (62 loc) · 1.65 KB
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
import type { Config } from 'tailwindcss';
import defaultTheme from 'tailwindcss/defaultTheme';
/** @type {import('tailwindcss').Config} */
// precompile dynamic color classes
import colors from './node_modules/tailwindcss/colors';
const safelist = [];
const extendedColors: { [key: string]: string | { [key: number]: string } } = {};
const colorValues = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900];
for (const key in colors) {
if (
// avoid deprecated color warnings && non custom colors
![
'lightBlue',
'warmGray',
'trueGray',
'coolGray',
'blueGray',
'inherit',
'current',
'transparent',
'black',
'white',
].includes(key)
) {
extendedColors[key] = colors[key as keyof typeof colors];
for (const value of colorValues) {
safelist.push(`bg-${key}-${value}`);
safelist.push(`text-${key}-${value}`);
}
}
}
export default {
content: ['./src/**/*.{js,jsx,ts,tsx}'],
theme: {
extend: {
fontFamily: {
primary: ['Inter', ...defaultTheme.fontFamily.sans],
},
keyframes: {
'up-down': {
'0%, 100%': { transform: 'translateY(0)' },
'50%': { transform: 'translateY(-10px)' },
},
},
animation: {
'up-down': 'up-down 2s linear infinite',
},
screens: {
xs: '475px',
},
transitionProperty: {
height: 'height',
'max-height': 'max-height',
spacing: 'margin, padding',
},
colors: extendedColors,
},
},
safelist,
plugins: [require('@tailwindcss/typography'), require('@tailwindcss/forms')],
darkMode: 'class',
} satisfies Config;