-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathtailwind.config.ts
48 lines (46 loc) · 1.18 KB
/
tailwind.config.ts
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
import type { Config } from 'tailwindcss';
export default {
content: ['./src/**/*.{js,jsx,ts,tsx}'],
darkMode: 'selector',
theme: {
extend: {
fontFamily: {
satoshi: ['"Satoshi"', '"Noto Sans JP"', 'sans-serif'],
},
colors: {
background: 'var(--background)',
foreground: 'var(--foreground)',
primary: {
DEFAULT: 'var(--primary)',
foreground: 'var(--primary-foreground)',
},
secondary: {
DEFAULT: 'var(--secondary)',
foreground: 'var(--secondary-foreground)',
},
tertiary: {
DEFAULT: 'var(--tertiary)',
foreground: 'var(--tertiary-foreground)',
},
accent: 'var(--accent)',
},
},
},
plugins: [],
safelist: generateColorSafelist([
'background',
'foreground',
'primary',
'primary-foreground',
'secondary',
'secondary-foreground',
'tertiary',
'tertiary-foreground',
'accent',
]),
} satisfies Config;
function generateColorSafelist(colorNames: string[]) {
const safelist: string[] = [];
colorNames.forEach((color) => safelist.push(`stroke-${color}`, `fill-${color}`));
return safelist;
}