forked from nacos-group/nacos-group.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tailwind.config.mjs
174 lines (172 loc) · 4.29 KB
/
tailwind.config.mjs
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
import starlightPlugin from '@astrojs/starlight-tailwind';
import themeColor from "./themeColor.json"
/** @type {import('tailwindcss').Config} */
export default {
daisyui: {
themes: [
{
mytheme: {
"primary": themeColor['gray']['13'],
"secondary": themeColor['gray']['02'],
"accent": themeColor['blue']['08'],
"neutral": themeColor['blue']['01'],
"base-100": themeColor['blue']['01'],
"info": themeColor['gray']['13'],
"success": themeColor['blue']['06'],
"warning": themeColor['gray']['06'],
"error": themeColor['gray']['13'],
},
},
],
},
content: ['./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}'],
theme: {
//替换调色板,只能用这下面的颜色
colors: {
blue: {
'01': themeColor['blue']['01'],
'02': themeColor['blue']['02'],
'03': themeColor['blue']['03'],
'04': themeColor['blue']['04'],
'05': themeColor['blue']['05'],
'06': themeColor['blue']['06'],
'07': themeColor['blue']['07'],
'08': themeColor['blue']['08'],
'09': themeColor['blue']['09'],
'10': themeColor['blue']['10'],
'11': themeColor['blue']['11'],
'12': themeColor['blue']['12'],
'13': themeColor['blue']['13'],
'14': themeColor['blue']['14'],
'15': themeColor['blue']['15'],
},
gray: {
'01': themeColor['gray']['01'],
'02': themeColor['gray']['02'],
'03': themeColor['gray']['03'],
'04': themeColor['gray']['04'],
'05': themeColor['gray']['05'],
'06': themeColor['gray']['06'],
'07': themeColor['gray']['07'],
'08': themeColor['gray']['08'],
'09': themeColor['gray']['09'],
'10': themeColor['gray']['10'],
'11': themeColor['gray']['11'],
'12': themeColor['gray']['12'],
'13': themeColor['gray']['13'],
'14': themeColor['gray']['14'],
'15': themeColor['gray']['15'],
}
},
extend: {
keyframes: {
fadeByGroup: {
'0%, 35%, 100%': { opacity: 0 },
'5%, 30%': { opacity: 1 }
}
},
animation: {
'fade-by-group': 'fadeByGroup 9s infinite linear'
},
flex: {
'16': '0 0 16.66%',
},
maxWidth: {
'1/6': '16.66%'
},
fontFamily: {
sans: ["Roboto","SourceHanSans","sans-serif"],
mono: ["Roboto","SourceHanSans","sans-serif"],
},
screens: {
'ssm': '450px',
},
// 设置starlight文档颜色
colors: {
gray: {
100: themeColor['gray']['02'],
200: themeColor['gray']['03'],
300: themeColor['gray']['06'],
400: themeColor['gray']['08'],
500: themeColor['gray']['09'],
600: themeColor['gray']['10'],
700: themeColor['gray']['11'],
800: themeColor['gray']['13'],
900: themeColor['gray']['15'],
},
accent: {
200: themeColor['blue']['07'],
600: themeColor['blue']['08'],
900: themeColor['blue']['11'],
950: themeColor['blue']['03']
},
white: themeColor['gray']['01'],
},
// https://tailwindcss.com/docs/typography-plugin
typography: (theme) => ({
blogToc: {
css: {
a: {
textDecoration: 'inherit',
color: theme('colors.gray.09'),
fontSize: '0.8275rem',
'&:hover': {
color: theme('colors.gray.13'),
}
},
ul: {
listStyleType: 'none', /* 去除默认的列表样式 */
paddingLeft: 0,
li: {
borderInlineStart: `1px solid ${themeColor['gray']['03']}`,
paddingLeft: '0.5rem'
}
},
li: {
paddingLeft: 0,
},
}
},
blogTocfold:{
css: {
a: {
textDecoration: 'inherit',
color: theme('colors.gray.09'),
fontSize: '0.8275rem',
'&:hover': {
color: theme('colors.gray.13'),
}
},
ul: {
listStyleType: 'none', /* 去除默认的列表样式 */
paddingLeft: 0,
li: {
paddingLeft: '0.5rem',
paddingBottom:'0.5rem'
}
},
li: {
paddingLeft: 0,
},
}
},
DEFAULT: {
css: {
tbody: {
tr: {
borderTop: '1px solid #eee',
'&:nth-child(odd)': {
backgroundColor: theme('colors.gray.01')
},
'&:nth-child(even)': {
backgroundColor: '#fff',
},
}
}
}
}
})
}
},
plugins: [starlightPlugin(), require("daisyui"),require('@tailwindcss/typography')],
};