-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tailwind.config.cjs
54 lines (50 loc) · 1.83 KB
/
tailwind.config.cjs
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
/** @type {import('tailwindcss').Config} */
// eslint-disable-next-line @typescript-eslint/no-var-requires, no-undef
const defaultTheme = require('tailwindcss/defaultTheme')
const generateSizeClass = (upToSize, startAt = 80) => {
const classes = {}
for (let i = startAt; i < upToSize / 4; i += 4) {
classes[i] = `${(i * 4) / 16}rem`
}
return classes
}
const labelsClasses = ['indigo', 'gray', 'green', 'blue', 'red', 'purple']
// eslint-disable-next-line no-undef
module.exports = {
darkMode: 'class', // add class='dark' to <html> to enable dark mode - https://tailwindcss.com/docs/dark-mode
content: ['./index.html', './src/**/*.{js,ts,jsx,tsx,css,md,mdx,html,json,scss}'],
purge: {
//Because we made a dynamic class with the label we need to add those classes
// to the safe list so the purge does not remove that
safelist: [
...labelsClasses.map((lbl) => `bg-${lbl}-500`),
...labelsClasses.map((lbl) => `bg-${lbl}-200`),
...labelsClasses.map((lbl) => `text-${lbl}-400`),
],
},
theme: {
screens: {
xxs: '300px',
xs: '475px',
...defaultTheme.screens,
},
extend: {
width: generateSizeClass(1024),
minHeight: generateSizeClass(1024, 0),
maxHeight: generateSizeClass(1024, 0),
maxWidth: generateSizeClass(1024, 0),
minWidth: generateSizeClass(1024, 0),
borderWidth: {
1: '1px',
},
fontFamily: {
sans: ['Roboto', 'sans-serif'],
},
gridTemplateColumns: {
'1/5': '1fr 5fr',
},
},
},
// eslint-disable-next-line no-undef
plugins: [require('@tailwindcss/forms'), require('@tailwindcss/typography')],
}