/
tailwind.config.js
129 lines (124 loc) · 2.98 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
const plugin = require('tailwindcss/plugin')
const colors = require('tailwindcss/colors')
const breakpoints = {
xs: '576px',
sm: '768px',
md: '992px',
lg: '1200px',
xl: '1400px',
}
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ['./src/**/*.{ts,tsx}',],
darkMode: 'selector',
theme: {
screens: breakpoints,
extend: {
textShadow: {
sm: '0 1px 2px var(--tw-shadow-color)',
default: '0 2px 4px var(--tw-shadow-color)',
},
// for container queries
containers: breakpoints,
width: breakpoints,
maxWidth: breakpoints,
minWidth: breakpoints,
container: {
padding: '1rem',
center: true,
},
colors: {
dark: {
0: '#C1C2C5',
1: '#A6A7AB',
2: '#8c8fa3',
3: '#5C5F66',
4: '#373A40',
5: '#2C2E33',
6: '#25262B',
7: '#1A1B1E',
8: '#141517',
9: '#101113',
},
gray: {
0: '#f8f9fa',
1: '#f1f3f5',
2: '#e9ecef',
3: '#dee2e6',
4: '#ced4da',
5: '#adb5bd',
6: '#868e96',
7: '#495057',
8: '#343a40',
9: '#212529',
},
yellow: {
0: '#FFF9DB',
1: '#FFF3BF',
2: '#FFEC99',
3: '#FFE066',
4: '#FFD43B',
5: '#FCC419',
6: '#FAB005',
7: '#F59F00',
8: '#F08C00',
9: '#E67700',
},
green: {
0: '#EBFBEE',
1: '#D3F9D8',
2: '#B2F2BB',
3: '#8CE99A',
4: '#69DB7C',
5: '#51CF66',
6: '#40C057',
7: '#37B24D',
8: '#2F9E44',
9: '#2B8A3E',
},
blue: {
0: '#E7F5FF',
1: '#D0EBFF',
2: '#A5D8FF',
3: '#74C0FC',
4: '#4DABF7',
5: '#339AF0',
6: '#228BE6',
7: '#1C7ED6',
8: '#1971C2',
9: '#1864AB',
}
}
},
},
plugins: [
require('./src/tailwind/container-queries'),
plugin(function ({ matchUtilities, theme, addUtilities, addVariant, e }) {
matchUtilities(
{
'text-shadow': (value) => ({
textShadow: value,
}),
},
{ values: theme('textShadow') },
),
addUtilities({
'.aspect-portrait': {
aspectRatio: '7 / 9'
},
'.card': {}
}),
addVariant('not-first', ({ modifySelectors, separator }) => {
modifySelectors(({ className }) => {
return `.${e(`not-first${separator}${className}`)}:not(:first-child)`
})
}),
addVariant('not-last', ({ modifySelectors, separator }) => {
modifySelectors(({ className }) => {
return `.${e(`not-last${separator}${className}`)}:not(:last-child)`
})
})
}),
// ...(process.env.NODE_ENV === 'production' ? { cssnano: {} } : {})
],
}