forked from ouun/stage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtailwind.config.js
179 lines (156 loc) · 4.75 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
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
/*
Tailwind - The Utility-First CSS Framework
Welcome to the Tailwind config file. This is where you can customize
Tailwind specifically for your project. Don't be intimidated by the
length of this file. It's really just a big JavaScript object and
we've done our very best to explain each section.
View the full documentation at https://tailwindcss.com.
*/
const plugin = require('tailwindcss/plugin');
const defaultTheme = require('tailwindcss/defaultTheme');
const stageDefaults = require('./resources/assets/stage-defaults');
const ciColors = require('./resources/assets/colors');
module.exports = {
future: {
removeDeprecatedGapUtilities: true,
purgeLayersByDefault: true,
defaultLineHeights: true,
// standardFontWeights: true
},
purge: {
content: [
'./index.php',
'./app/**/*.php',
'./config/defaults.php',
'./resources/views/**/*.php',
'./resources/assets/scripts/**/*.js',
],
options: {
whitelist: [],
whitelistPatterns: [
/^z(-.*)?$/,
/^bg(-.*)?$/,
/^text(-.*)?$/,
/^placeholder(-.*)?$/,
/^border(-.*)?$/,
/^opacity(-.*)?$/,
/^flex(-.*)?$/,
/^h(-.*)?$/,
/^w(-.*)?$/,
/^min(-.*)?$/,
/^max(-.*)?$/,
/^p[a-z]{0,1}(-.*)?$/,
/^m[a-z]{0,1}(-.*)?$/,
],
},
},
theme: {
...stageDefaults,
extend: {
...stageDefaults.extend,
colors: {
...stageDefaults.extend.colors,
...ciColors,
...{
body: `var(--color-body, ${ciColors['ibb-gray'][500]})`,
link: 'var(--color-link, currentColor)',
hover: 'var(--color-hover)',
copy: `var(--color-copy, ${ciColors['ibb-gray'][500]})`,
heading: `var(--color-heading, ${ciColors['ibb-blue'][500]})`,
primary: 'var(--color-primary)',
secondary: 'var(--color-secondary)',
},
},
fontFamily: {
...stageDefaults.extend.fontFamily,
sans: ['"Open Sans"', 'Inter', ...defaultTheme.fontFamily.sans],
...theme => ({
heading: `var(--heading-font-family, ${theme('fontFamily.sans')})`,
copy: `var(--heading-font-family, ${theme('fontFamily.sans')})`,
}),
},
},
customForms: theme => ({
default: {
input: {
borderRadius: theme('borderRadius.sm'),
backgroundColor: theme('colors.gray.200'),
'&:focus': {
backgroundColor: theme('colors.white'),
},
},
select: {
borderRadius: theme('borderRadius.sm'),
boxShadow: theme('boxShadow.default'),
},
checkbox: {
width: theme('spacing.6'),
height: theme('spacing.6'),
},
},
}),
},
/*
|-----------------------------------------------------------------------------
| Variants https://tailwindcss.com/docs/configuration#variants
|-----------------------------------------------------------------------------
|
| Here is where you control which variants are generated and what variants are
| generated for each of those variants.
|
| Currently supported variants:
| - responsive
| - hover
| - focus
| - active
| - group-hover
|
| To disable a module completely, use `false` instead of an array.
|
*/
variants: {
backgroundColor: ({ after }) => after(['focus-within']),
borderCollapse: false,
borderColor: ({ after }) => after(['focus-within']),
// opacity: ['responsive'],
// outline: ['focus'],
// fill: [],
// stroke: [],
},
corePlugins: {
container: false,
},
/*
|-----------------------------------------------------------------------------
| Plugins https://tailwindcss.com/docs/plugins
|-----------------------------------------------------------------------------
|
| Here is where you can register any plugins you'd like to use in your
| project. Tailwind's built-in `container` plugin is enabled by default to
| give you a Bootstrap-style responsive container component out of the box.
|
| Be sure to view the complete plugin documentation to learn more about how
| the plugin system works.
|
*/
plugins: [
require('@tailwindcss/ui'),
require('tailwindcss-wordpress'),
// require('@tailwindcss/aspect-ratio'),
require('tailwindcss-aspect-ratio'),
// require('@tailwindcss/forms'),
plugin(function({ addUtilities }) {
const newUtilities = {
'.scroll-smooth': {
'scroll-behavior': 'smooth',
},
'@media (prefers-reduced-motion)': {
'.scroll-smooth': {
'scroll-behavior': 'auto',
},
},
};
addUtilities(newUtilities, ['responsive', 'hover']);
}),
],
};