forked from karnama/vueish
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tailwind.config.js
55 lines (49 loc) · 1.48 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
45
46
47
48
49
50
51
52
53
54
55
const brandColor = (level) => {
return function ({opacityVariable, opacityValue}) {
if (opacityValue) {
return `rgba(var(--color-brand-${level}), ${opacityValue})`;
}
if (opacityVariable) {
return `rgba(var(--color-brand-${level}), var(${opacityVariable}, 1))`;
}
return `rgb(var(--color-brand-${level}))`;
};
};
const brandColors = (levels) => {
const colors = {};
levels.forEach(level => colors['brand-' + String(level)] = brandColor(level));
return colors;
};
/** @type {import('tailwindcss').Config} */
const tailwindConfig = {
content: ['./src/**/*.{vue,ts,tsx}'],
darkMode: 'class',
theme: {
borderColor: theme => ({
...theme('colors'),
DEFAULT: theme('colors.gray.400', 'currentColor')
}),
extend: {
colors: {
...brandColors([50, 100, 200, 300, 400, 500, 600, 700, 800, 900]),
gray: {
250: '#DBDEE3',
450: '#848B98',
650: '#414B5A',
750: '#2B3544',
850: '#242D3C'
}
},
transitionProperty: {
'spacing': 'margin, padding'
},
rotate: {
'270': '270deg',
}
}
}
};
if (process.env.NODE_ENV === 'production') {
tailwindConfig.content.push('!./src/**/Demo*.vue')
}
module.exports = tailwindConfig;