-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtailwind.config.ts
More file actions
72 lines (71 loc) · 2.11 KB
/
tailwind.config.ts
File metadata and controls
72 lines (71 loc) · 2.11 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
67
68
69
70
71
72
import type { Config } from 'tailwindcss'
const config: Config = {
content: [
'./src/pages/**/*.{js,ts,jsx,tsx,mdx}',
'./src/components/**/*.{js,ts,jsx,tsx,mdx}',
'./src/app/**/*.{js,ts,jsx,tsx,mdx}',
],
darkMode: 'class', // 支持暗色模式
theme: {
extend: {
colors: {
primary: 'rgb(var(--primary-color) / <alpha-value>)',
'primary-dark': 'rgb(var(--primary-dark-color) / <alpha-value>)',
'primary-light': 'rgb(var(--primary-light-color) / <alpha-value>)',
'text-light': 'rgb(var(--text-light-color) / <alpha-value>)',
'bg-card': 'rgb(var(--bg-card-color) / <alpha-value>)',
},
backgroundImage: {
'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))',
'gradient-conic': 'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))',
},
boxShadow: {
'inner-top': 'inset 0 1px 2px 0 rgb(0 0 0 / 0.05)',
},
height: {
'header': '64px',
'screen-minus-header': 'calc(100vh - 64px)',
},
zIndex: {
'modal': '1000',
'dropdown': '100',
'sidebar': '50',
},
typography: (theme: any) => ({
DEFAULT: {
css: {
maxWidth: '100%',
color: theme('colors.gray.700'),
a: {
color: theme('colors.primary'),
'&:hover': {
color: theme('colors.primary-dark'),
},
},
'h1, h2, h3, h4': {
fontWeight: theme('fontWeight.bold'),
marginTop: theme('spacing.8'),
marginBottom: theme('spacing.4'),
},
},
},
dark: {
css: {
color: theme('colors.gray.300'),
a: {
color: theme('colors.primary-light'),
'&:hover': {
color: theme('colors.primary'),
},
},
'h1, h2, h3, h4': {
color: theme('colors.white'),
},
},
},
}),
},
},
plugins: [require('@tailwindcss/typography')],
}
export default config