-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtailwind.config.js
99 lines (94 loc) · 2.62 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
function range(start, end, increment = 1) {
const count = Math.floor((end - start + increment) / increment);
return Array(count)
.fill(0)
.map((_, idx) => start + idx * increment);
}
const minFontSize = 5;
const maxFontSize = 80;
const minFontWeight = 100;
const maxFontWeight = 1000;
const minSpacingPixel = 0;
const maxSpacingPixel = 800;
const spacingPixelIncrement = 5;
const vhs = ['10vh', '20vh', '30vh', '40vh', '50vh', '60vh', '70vh', '80vh', '90vh', '100vh'];
module.exports = {
content: ['./src/**/*.{js,jsx,ts,tsx}'],
theme: {
screens: {
'4xs': '280px',
'3xs': '320px',
'2xs': '380px',
xs: '480px',
sm: '640px',
md: '768px',
slg: '964px',
lg: '1024px',
xl: '1280px',
'2xl': '1536px',
'3xl': '1780px'
},
// Extend default configurations
extend: {
colors: {
red: '#ff1c44',
green: '#17d118',
blue: '#1e6eef',
cyan: '#03bfc7',
pink: '#ff4fb6',
purple: '#7633fa',
yellow: '#fec916',
'thick-red': '#991029',
'thick-green': '#006b01',
'thick-blue': '#0e3d8c',
'thick-cyan': '#02858b',
'thick-pink': '#ab186f',
'thick-purple': '#430bb0',
'thick-yellow': '#81670e'
},
container: {
center: true
}
},
// Override default configurations
fontWeight: {
...range(minFontWeight, maxFontWeight).reduce((merged, f) => ({ ...merged, [f]: `${f}px` }), {})
},
fontSize: {
...range(minFontSize, maxFontSize).reduce((merged, f) => ({ ...merged, [f]: `${f}px` }), {})
},
spacing: {
...range(minSpacingPixel, maxSpacingPixel, spacingPixelIncrement).reduce(
(merged, f) => ({ ...merged, [f]: `${f}px` }),
{}
)
},
maxWidth: {
...range(minSpacingPixel, maxSpacingPixel, spacingPixelIncrement).reduce(
(merged, f) => ({ ...merged, [f]: `${f}px` }),
{}
)
},
minWidth: {
...range(minSpacingPixel, maxSpacingPixel, spacingPixelIncrement).reduce(
(merged, f) => ({ ...merged, [f]: `${f}px` }),
{}
)
},
maxHeight: {
...range(minSpacingPixel, maxSpacingPixel, spacingPixelIncrement).reduce(
(merged, f) => ({ ...merged, [f]: `${f}px` }),
{}
),
...vhs.reduce((merged, vh) => ({ ...merged, [vh]: vh }), {})
},
minHeight: {
...range(minSpacingPixel, maxSpacingPixel, spacingPixelIncrement).reduce(
(merged, f) => ({ ...merged, [f]: `${f}px` }),
{}
),
...vhs.reduce((merged, vh) => ({ ...merged, [vh]: vh }), {})
}
},
plugins: []
};