-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtailwind.config.js
48 lines (43 loc) · 1.31 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
module.exports = {
content: [
'./resources/**/*.antlers.html',
'./resources/**/*.blade.php',
'./resources/**/*.vue',
'./content/**/*.md'
],
theme: {
extend: {
backgroundColor: {
'accent-color': 'pink',
'accent-color-blue': '#c4cce7',
},
borderRadius: {
'xl': '1rem',
},
boxShadow: {
'subtle': '0 4px 6px rgba(0, 0, 0, 0.1)',
},
spacing: {
'18': '4.5rem',
},
},
},
plugins: [
require('@tailwindcss/typography'),
function ({ addBase, theme }) {
function extractColorVars(colorObj, colorGroup = '') {
return Object.keys(colorObj).reduce((vars, colorKey) => {
const value = colorObj[colorKey];
const newVars =
typeof value === 'string'
? { [`--color${colorGroup}-${colorKey}`]: value }
: extractColorVars(value, `-${colorKey}`);
return { ...vars, ...newVars };
}, {});
}
addBase({
':root': extractColorVars(theme('colors')),
});
},
],
}