-
-
Notifications
You must be signed in to change notification settings - Fork 223
/
Copy pathtailwind.config.js
65 lines (63 loc) · 1.54 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
const tailwindColors = require('tailwindcss/colors');
const defaultTheme = require('tailwindcss/defaultTheme');
/**
* Return tailwind v3 non-deprecated colors
* PS: code is dirty cause tailwind colors have getters on them
* that will log a warning when accessing the object key
* @type {Record<string, string | Record<string, string>>}
*/
const tailwindV3Colors = Object.entries(
Object.getOwnPropertyDescriptors(tailwindColors)
)
.filter(
([, desc]) =>
Object.prototype.hasOwnProperty.call(desc, 'value') &&
typeof desc.value !== 'function'
)
// eslint-disable-next-line unicorn/no-array-reduce
.reduce((acc, [key]) => {
if (
!['coolGray', 'lightBlue', 'warmGray', 'trueGray', 'blueGray'].includes(
key
)
) {
acc[key] = tailwindColors[key];
}
return acc;
}, {});
module.exports = {
content: ['./src/**/*.{js,ts,jsx,tsx}'],
theme: {
screens: {
...defaultTheme.screens,
},
colors: {
...tailwindV3Colors,
bermuda: '#78dcca',
tahiti: {
100: '#cffafe',
200: '#a5f3fc',
300: '#67e8f9',
400: '#22d3ee',
500: '#06b6d4',
600: '#0891b2',
700: '#0e7490',
800: '#155e75',
900: '#164e63',
},
},
fontFamily: {
sans: ['Inter', ...defaultTheme.fontFamily.sans],
serif: [...defaultTheme.fontFamily.serif],
mono: [...defaultTheme.fontFamily.mono],
},
extend: {
/**
spacing: {
128: '32rem',
},
*/
},
},
plugins: [],
};