-
Notifications
You must be signed in to change notification settings - Fork 0
/
tailwind.config.js
82 lines (79 loc) · 2.46 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
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
const colors = require('./src/components/quarks/Tokens/Colors')
const spacingNumbersByScale = require('./src/components/quarks/Tokens/SpacingNumberByScale')
const spacingBreakpointsByScale = require('./src/components/quarks/Tokens/SpacingBreakpointsByScale')
const spacingPercentage = require('./src/components/quarks/Tokens/SpacingPercentage')
const flattenColorPalette = require('tailwindcss/lib/util/flattenColorPalette').default
module.exports = {
prefix: 'yoo-',
purge: [
'./**/**/*.{css,scss,sass,vue,pug,ts}'
],
important: false,
darkMode: 'class', // or 'media' or 'class'
theme: {
colors,
fontFamily: {
'awesome-brands': ['Font Awesome 5 Brands', 'fa-brands-400'],
'awesome-solid': ['Font Awesome 5 Free', 'fa-solid-900'],
'awesome-regular': ['Font Awesome 5 Free', 'fa-regular-400'],
'mont-regular': ['Montserrat', 'Montserrat-Regular'],
'mont-medium': ['Montserrat', 'Montserrat-medium'],
'mont-semibold': ['Montserrat', 'Montserrat-SemiBold'],
'mont-bold': ['Montserrat', 'Montserrat-Bold']
},
spacing: {
...spacingNumbersByScale(4),
...spacingPercentage
},
minHeight: {
...spacingNumbersByScale(4),
...spacingPercentage
},
height: {
...spacingNumbersByScale(4),
...spacingPercentage
},
maxHeight: {
...spacingNumbersByScale(4),
...spacingPercentage
},
minWidth: {
...spacingNumbersByScale(4),
...spacingPercentage
},
width: {
...spacingNumbersByScale(4),
...spacingPercentage
},
maxWidth: {
...spacingNumbersByScale(4),
...spacingPercentage
},
borderRadius: {
...spacingPercentage
},
fontSize: {
...spacingBreakpointsByScale(1, 4)
},
borderWidth: {
...spacingNumbersByScale(1)
}
},
variants: {
extend: {}
},
plugins: [
({ addUtilities, e, theme, variants }) => {
const colors = flattenColorPalette(theme('borderColor'))
delete colors['default']
const colorMap = Object.keys(colors)
.map(color => ({
[`.${e(`border-t-${color}`)}`]: { 'border-top-color': colors[color] },
[`.${e(`border-r-${color}`)}`]: { 'border-right-color': colors[color] },
[`.${e(`border-b-${color}`)}`]: { 'border-bottom-color': colors[color] },
[`.${e(`border-l-${color}`)}`]: { 'border-left-color': colors[color] }
}))
addUtilities(colorMap, variants('borderColor'))
}
]
}