-
Notifications
You must be signed in to change notification settings - Fork 4
/
tailwind.config.js
45 lines (44 loc) · 1.12 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
const opacityManager = ({opacityVariable, opacityValue}, cssVar) => {
if (opacityValue !== undefined) {
return `rgba(${cssVar}, ${opacityValue})`;
}
if (opacityVariable !== undefined) {
return `rgba(${cssVar}, var(${opacityVariable}, 1))`;
}
return `rgb(${cssVar})`;
};
module.exports = {
purge: ['./pages/**/*.{js,ts,jsx,tsx}', './components/**/*.{js,ts,jsx,tsx}'],
darkMode: false, // or 'media' or 'class'
important: true,
theme: {
extend: {
backgroundColor: {
primary: 'var(--bg-primary)',
secondary: 'var(--bg-secondary)',
},
textColor: {
primary: 'var(--text-primary)',
secondary: 'var(--text-secondary)',
},
colors: {
purple: props => {
return opacityManager(props, 'var(--color-purple)');
},
orange: props => {
return opacityManager(props, 'var(--color-orange)');
},
yellow: props => {
return opacityManager(props, 'var(--color-yellow)');
},
},
maxWidth: {
cart: '440px',
},
},
},
variants: {
extend: {},
},
plugins: [],
};