-
Notifications
You must be signed in to change notification settings - Fork 2
/
tailwind.config.js
243 lines (240 loc) · 7 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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
// To see, check and test:
// // Theming Tailwind with CSS Variables
// https://www.youtube.com/watch?v=MAtaT8BZEAo
//
// 07: Customizing Your Design System – Tailwind CSS: From Zero to Production
// https://www.youtube.com/watch?v=0l0Gx8gWPHk
// const { margin } = require('tailwindcss/defaultTheme');
const baseColors = {
turquoise: {
darkest: '#0891B2', // cyan-600
dark: '#06B6D4', // cyan-500
DEFAULT: '#22D3EE', // cyan-400
light: '#67E8F9', // cyan-300
lightest: '#A5F3FC', // cyan-200
},
primary: {
darkest: '#1D4ED8', // blue-700
dark: '#2563EB', // blue-600
DEFAULT: '#3B82F6', // blue-500
light: '#60A5FA', // blue-400
lightest: '#93C5FD', // blue-300
},
secondary: {
darkest: '#4F46E5', // indigo-600
dark: '#6366F1', // indigo-500
DEFAULT: '#818CF8', // indigo-400
light: '#A5B4FC', // indigo-300
lightest: '#C7D2FE', // indigo-200
},
success: {
darkest: '#059669', // green-600
dark: '#10B981', // green-500
DEFAULT: '#34D399', // green-400
light: '#6EE7B7', // green-300
lightest: '#A7F3D0', // green-200
},
danger: {
darkest: '#B91C1C', // red-700
dark: '#DC2626', // red-600
DEFAULT: '#EF4444', // red-500
light: '#F87171', // red-400
lightest: '#FCA5A5', // red-300
},
warning: {
darkest: '#D97706', // yellow-600
dark: '#F59E0B', // yellow-500
DEFAULT: '#FBBF24', // yellow-400
light: '#FCD34D', // yellow-300
lightest: '#FDE68A', // yellow-200
},
}
module.exports = {
content: [
'./**/*.twig',
'../../../{modules,themes}/custom/**/*.twig'
],
safelist: [
// Needed by twbase_utils module, see twbase_utils_editor_js_settings_alter().
'tw-p-4',
'tw-prose',
// Needed in menu while switching between dark/light mode
'tw-text-white',
'tw-text-black',
'tw-text-slate-200',
'tw-text-slate-500',
],
darkMode: 'class', // false or 'media' or 'class'
theme: {
extend: {
colors: {
turquoise: {
darkest: baseColors.turquoise.darkest,
dark: baseColors.turquoise.dark,
DEFAULT: baseColors.turquoise.DEFAULT,
light: baseColors.turquoise.light,
lightest: baseColors.turquoise.lightest,
},
primary: {
darkest: baseColors.primary.darkest,
dark: baseColors.primary.dark,
DEFAULT: baseColors.primary.DEFAULT,
light: baseColors.primary.light,
lightest: baseColors.primary.lightest,
},
secondary: {
darkest: baseColors.secondary.darkest,
dark: baseColors.secondary.dark,
DEFAULT: baseColors.secondary.DEFAULT,
light: baseColors.secondary.light,
lightest: baseColors.secondary.lightest,
},
success: {
darkest: baseColors.success.darkest,
dark: baseColors.success.dark,
DEFAULT: baseColors.success.DEFAULT,
light: baseColors.success.light,
lightest: baseColors.success.lightest,
},
danger: {
darkest: baseColors.danger.darkest,
dark: baseColors.danger.dark,
DEFAULT: baseColors.danger.DEFAULT,
light: baseColors.danger.light,
lightest: baseColors.danger.lightest,
},
warning: {
darkest: baseColors.warning.darkest,
dark: baseColors.warning.dark,
DEFAULT: baseColors.warning.DEFAULT,
light: baseColors.warning.light,
lightest: baseColors.warning.lightest,
},
},
// See https://github.com/tailwindlabs/tailwindcss-typography/blob/master/src/styles.js
typography: (theme) => ({
DEFAULT: {
css: {
maxWidth: null,
a: {
color: 'inherit',
},
blockquote: {
/* position: 'relative', */
padding: '0.75rem 3rem 1rem 2.25rem',
/*
margin: '1rem',
border: 'none',
borderRadius: '1.5rem',
*/
background: theme('colors.slate.100'),
},
'blockquote cite': {
display: 'inline-block',
fontSize: '.875em',
lineHeight: '1.25rem',
paddingBottom: '1.25rem',
},
/*
'blockquote p:first-of-type::before, blockquote p:last-of-type::after': {
fontFamily: 'Georgia, serif',
position: 'absolute',
fontWeight: '600',
color: theme('colors.slate.400'),
},
'blockquote p::before': {
content: '“',
fontSize: '4.5rem',
lineHeight: '1',
marginRight: '-2rem',
right: '100%',
top: '.5rem',
},
'blockquote p::after': {
content: '”',
bottom: '-1rem',
fontSize: '8rem',
lineHeight: '2.5rem',
right: '1.25rem',
top: 'auto',
},
*/
// 'ol > li::before': {
// color: theme('colors.slate.800'),
// },
},
},
md: {
css: {
blockquote: {
padding: '0.75rem 2rem 1rem 2.25rem',
},
'blockquote cite': {
paddingBottom: '1rem',
},
},
},
sm: {
css: {
blockquote: {
padding: '0.75rem 2.5rem 1rem 2.25rem',
},
'blockquote cite': {
paddingBottom: '1rem',
},
},
},
dark: {
css: {
color: theme('colors.slate.200'),
'[class~="lead"]': {
color: theme('colors.slate.200'),
},
h1: {
color: theme('colors.slate.200'),
},
h2: {
color: theme('colors.slate.200'),
},
h3: {
color: theme('colors.slate.200'),
},
h4: {
color: theme('colors.slate.200'),
},
h5: {
color: theme('colors.slate.200'),
},
h6: {
color: theme('colors.slate.200'),
},
strong: {
color: theme('colors.slate.200'),
},
code: {
color: theme('colors.slate.400'),
},
pre: {
backgroundColor: theme('colors.slate.900'),
},
blockquote: {
color: theme('colors.slate.200'),
background: theme('colors.slate.600'),
},
'ol > li::before': {
color: theme('colors.slate.200'),
},
'thead th': {
color: theme('colors.slate.200'),
},
}
}
})
},
},
plugins: [
require('@tailwindcss/typography'),
require('@tailwindcss/forms'),
],
prefix: 'tw-'
}