-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathtailwind.preset.js
128 lines (123 loc) · 3.34 KB
/
tailwind.preset.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
const theme = require('./css/src/theme')
module.exports = {
theme,
important: true,
/*
* This is where we disable Tailwind's "core plugins", most of
* which generate utility classes. There are a *lot* of these
* turned on by default. Disabling them here saves us many
* kilobytes in generated CSS.
*
* See: <https://tailwindcss.com/docs/configuration#core-plugins>
*/
corePlugins: [
// TODO [^3]: add preflight (https://tailwindcss.com/docs/preflight)
'accessibility',
'alignContent',
'alignItems',
'appearance',
'backgroundColor',
'borderColor',
'borderRadius',
'borderStyle',
'borderWidth',
'cursor',
'display',
'flex',
'flexDirection',
'flexShrink',
'flexWrap',
'fontFamily',
'fontSize',
'fontSmoothing',
'fontWeight',
'gap',
'gridColumn',
'gridRow',
'gridTemplateColumns',
'gridTemplateRows',
'height',
'inset',
'justifyContent',
'justifyItems',
'letterSpacing',
'listStyleType',
'margin',
'maxWidth',
'opacity',
'overflow',
'padding',
'pointerEvents',
'position',
'space',
'textAlign',
'textColor',
'textDecoration',
'verticalAlign',
'visibility',
'whitespace',
'width',
'zIndex'
],
/*
* This is where we tell Tailwind which variants to make available
* for each "core plugin". Most plugins get responsive variants out
* of the box, but we can shrink the size of our CSS significantly
* by turning off responsive variants for ones that we don't need
* to change at different screen widths.
*
* See: <https://tailwindcss.com/docs/configuring-variants>
*/
variants: {
// TODO [^3]: nix 'focus'
accessibility: ['responsive', 'focus', 'hocus'],
appearance: [],
// TODO [^3]: nix 'focus' + 'hover'
backgroundColor: ['focus', 'focus-within', 'hover', 'hocus', 'group-hocus', 'details'],
// TODO [^3]: nix 'focus' + 'hover'
borderColor: ['focus', 'hover', 'hocus', 'group-hocus', 'details'],
borderWidth: ['hocus'],
cursor: [],
display: ['responsive', 'group-hocus', 'details'],
fill: [],
fontWeight: ['responsive'],
fontSize: ['responsive'],
fontSmoothing: [],
fontStyle: [],
flexDirection: ['responsive'],
flexWrap: [],
gap: ['responsive'],
gridColumn: ['responsive'],
gridRow: ['responsive'],
gridTemplateColumns: ['responsive'],
gridTemplateRows: ['responsive'],
height: ['responsive'],
inset: ['responsive'],
letterSpacing: ['responsive'],
lineHeight: ['responsive'],
listStyleType: ['responsive'],
listStylePosition: [],
overflow: [], // TODO [^2.3]: add 'hocus', 'group-hocus'
padding: ['responsive'],
pointerEvents: [],
position: ['responsive'],
margin: ['responsive'],
maxWidth: ['responsive'],
space: ['responsive'],
stroke: [],
strokeWidth: [],
// TODO [^3]: nix 'focus' + 'hover'
textColor: ['focus', 'hover', 'hocus', 'group-hocus', 'details'],
// TODO [^3]: nix 'focus' + 'hover'
textDecoration: ['focus', 'hover', 'hocus'],
userSelect: [],
verticalAlign: ['responsive'],
visibility: ['responsive', 'group-hocus'],
width: ['responsive'],
zIndex: ['responsive']
},
plugins: [
require('tailwindcss-interaction-variants'),
require('./lib/tailwind/details')
]
}