-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtailwind.config.js
44 lines (41 loc) · 1.13 KB
/
tailwind.config.js
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
function getColorsVar(prefix, ...name) {
return name.reduce((colors, curr) => {
const varName = prefix ? `${prefix}${curr}` : curr;
colors[curr] = `var(--${varName})`;
return colors;
}, {});
}
const base = getColorsVar(null, 'primary', 'secondary', 'danger', 'green', 'warning');
const backgroundColor = getColorsVar('bg-', 'dark', 'default', 'light', 'lighter', 'input', 'input-dark', 'card');
const textColor = getColorsVar('text-', 'default', 'light', 'lighter');
module.exports = {
purge: {
enabled: process.env.NODE_ENV === 'production',
content: ['./src/**/*.js'],
options: {
whitelist: ['light-theme', 'table-ui', 'tooltip-ui', 'vue-popover-theme', 'swiper-wrapper', 'toasted', 'dark-theme'],
whitelistPatterns: [/oneword/, /oneWord-/],
},
},
theme: {
borderRadius: {
sm: '0.125rem',
default: '0.25rem',
md: '0.5rem',
lg: '0.9375rem',
full: '9999px',
},
extend: {
colors: base,
backgroundColor,
textColor,
},
container: {
padding: '2rem',
center: true,
},
},
variants: {
boxShadow: ['group-hover'],
},
};