-
Notifications
You must be signed in to change notification settings - Fork 172
/
tailwind.config.js
256 lines (238 loc) · 6.02 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
244
245
246
247
248
249
250
251
252
253
254
255
256
/** @type {import('tailwindcss').Config} */
const plugin = require('tailwindcss/plugin')
const typography = require('@tailwindcss/typography')
const dlsColors = {
white: '#ffffff',
black: '#000000',
gray: {
50: '#F9FAFB',
75: '#EBEBEB',
100: '#F5F7FB',
200: '#E4E9F4',
300: '#A6B6D9',
400: '#5E6E8C',
500: '#374151',
600: '#1F2A37',
700: '#111928',
800: '#14171f',
},
blue: {
100: '#DCFEFE',
200: '#C7FFFF',
300: '#00CBEC',
400: '#00A1C7',
500: '#005482',
},
vermillion: {
100: '#FFDFDC',
200: '#FFC9C9',
300: '#FF5543',
400: '#ED2E20',
500: '#C22626',
},
lemon: {
50: '#C9C9C9',
100: '#FFFCB1',
200: '#FFF2CF',
300: '#FFDB45',
400: '#FFC247',
500: '#FF9933',
},
green: {
100: '#D2FFF1',
200: '#C4FFE8',
300: '#8FEDCF',
400: '#17AB52',
500: '#1F7D45',
},
blurple: {
100: '#EBE3FD',
200: '#C9B3F9',
300: '#A884F6',
400: '#8552F2',
500: '#6525EF',
600: '#4D10D1',
},
violet: {
100: '#EEDFFF',
200: '#E8D1FF',
300: '#CE9CFF',
400: '#A112FF',
500: '#820DDE',
600: '#6112A3',
700: '#270741',
750: '#1e0632',
800: '#160425',
},
cerise: {
100: '#FFDFF5',
200: '#FFD1F2',
300: '#E1449A',
400: '#D62687',
500: '#C4147D',
600: '#9E1769',
},
}
module.exports = {
// Files run through Tailwind
content: ['./src/pages/**/*.tsx', './src/components/**/*.tsx'],
// Theme based on our Marketing DLS
theme: {
colors: ({ colors }) => ({
inherit: colors.inherit,
current: colors.current,
transparent: colors.transparent,
...dlsColors,
}),
fontFamily: {
sans: [
'InterVariable',
'ui-sans-serif',
'system-ui',
'-apple-system',
'BlinkMacSystemFont',
'"Segoe UI"',
'Roboto',
'"Helvetica Neue"',
'Arial',
'"Noto Sans"',
'sans-serif',
],
mono: [
'Roboto mono',
'ui-sans-serif',
'system-ui',
'-apple-system',
'BlinkMacSystemFont',
'"Segoe UI"',
'Roboto',
'"Helvetica Neue"',
'Arial',
'"Noto Sans"',
'sans-serif',
],
display: ['Space Grotesk'],
},
fontSize: {
xs: ['0.75rem', { lineHeight: '1.5' }], // 12px / 18px
sm: ['0.875rem', { lineHeight: '1.5' }], // 14px / 21px
base: ['1rem', { lineHeight: '1.5' }], // 16px / 24px
lg: ['1.125rem', { lineHeight: '1.5' }], // 18px / 27px
xl: ['1.25rem', { lineHeight: '1.5' }], // 20px / 28px
'2xl': ['1.5rem', { lineHeight: '1.4' }], // 24px / 34px
'3xl': ['1.875rem', { lineHeight: '1.3' }], // 30px / 42px
'4xl': ['2.25rem', { lineHeight: '1.2' }], // 36px / 43px
'5xl': ['2.5rem', { lineHeight: '1.2' }], // 40px / 48px
'6xl': ['3rem', { lineHeight: '1.2' }], // 48px / 58px
'7xl': ['3.25rem', { lineHeight: '1.2' }], // 52px / 62px
'8xl': ['3.875rem', { lineHeight: '1.2' }], // 72px / 74px
},
letterSpacing: {
tightest: '-1px',
tighter: '-0.5px',
tight: '-0.25px',
normal: 0,
wide: '0.25px',
},
// This extends (not replaces) theme properties
extend: {
/**
* Breakpoints and responsive modifiers.
* Other than xs, we use the default Tailwind breakpoints.
* See: https://tailwindcss.com/docs/responsive-design
* sm: 640px, md: 768px, lg: 1024px, xl: 1280px, 2xl: 1536px
*/
screens: {
xs: '480px',
md: '830px',
mdi: { min: '1024px' },
lg: '1124px',
},
spacing: {
1: '4px',
2: '8px',
3: '12px',
4: '16px',
5: '20px',
6: '24px',
7: '28px',
8: '32px',
9: '36px',
10: '40px',
11: '44px',
12: '48px',
14: '56px',
16: '64px',
20: '80px',
24: '96px',
28: '112px',
32: '128px',
36: '144px',
40: '160px',
44: '176px',
48: '192px',
52: '208px',
56: '224px',
60: '240px',
64: '256px',
72: '288px',
80: '320px',
96: '384px',
},
borderWidth: {
1: '1px',
3: '3px',
16: '16px',
},
keyframes: {
flashBackground: {
'0%': { background: dlsColors.lemon[200] },
'100%': { backgroundColor: 'none' },
},
fadeOutSlow: {
'0%': { opacity: 1 },
'100%': { opacity: 0 },
},
fadeIn: {
'0%': { opacity: 0 },
'100%': { opacity: 1 },
},
},
animation: {
'flash-background': 'flashBackground 1s ease-out',
fadeOutSlow: 'fadeOut 1s ease-out',
fadeIn: 'fadeIn 0.175s ease-in forwards',
fadeInSlow: 'fadeIn 0.5s ease-in forwards',
slideFadeIn: 'slideFadeIn 2s ease-in-out',
},
dropShadow: {
xl: `0px 0px 15px ${dlsColors.violet['400']}`,
'2xl': `0px 0px 38px ${dlsColors.violet['400']}`,
},
boxShadow: {
xl: `0px 0px 23px ${dlsColors.violet['400']}`,
btn: `0px 0px 20px rgba(161, 18, 255, 0.7)`,
modal: `0px 5px 23px rgba(0, 0, 0, 0.2)`,
card: `0px 0px 20px -2px #A112FF80`,
video: `0px 0px 40px 3px rgba(161, 18, 255, 0.50)`,
cta: `0px 25px 50px -12px rgba(0, 0, 0, 0.25)`,
},
},
},
plugins: [
typography,
plugin(({ addBase }) => {
const extractColors = (colors, colorGroup = '') => {
return Object.keys(colors).reduce((previousColors, colorKey) => {
const value = colors[colorKey]
const cssVariable = colorGroup ? `--sg-color-${colorGroup}-${colorKey}` : `--sg-color-${colorKey}`
const newColors = typeof value === 'string' ? { [cssVariable]: value } : extractColors(value, colorKey)
return { ...previousColors, ...newColors }
}, {})
}
addBase({
':root': extractColors(dlsColors),
})
}),
],
}