-
Notifications
You must be signed in to change notification settings - Fork 0
/
tailwind.config.js
147 lines (140 loc) · 4.64 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
const tailwindColors = require('./node_modules/tailwindcss/colors')
const safelist = []
// Skip these to avoid a load of deprecated warnings when tailwind starts up
const deprecated = ['lightBlue', 'warmGray', 'trueGray', 'coolGray', 'blueGray']
for (const colorName in tailwindColors) {
if (deprecated.includes(colorName)) {
continue
}
const shades = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900]
const palette = tailwindColors[colorName]
if (typeof palette === 'object') {
shades.forEach((shade) => {
if (shade in palette) {
safelist.push(`text-${colorName}-${shade}`)
safelist.push(`child:text-${colorName}-${shade}`)
safelist.push(`hover:text-${colorName}-${shade}`)
safelist.push(`dark:hover:text-${colorName}-${shade}`)
safelist.push(`dark:text-${colorName}-${shade}`)
safelist.push(`bg-${colorName}-${shade}`)
safelist.push(`hover:bg-${colorName}-${shade}`)
safelist.push(`nextDiv:text-${colorName}-300`)
safelist.push(`zigzag-${colorName}-400`)
safelist.push(`zigzag-${colorName}-600`)
safelist.push(`hover:zigzag-${colorName}-400`)
safelist.push(`hover:zigzag-${colorName}-600`)
safelist.push(`text-${colorName}`)
safelist.push(`primary-${colorName}`)
safelist.push(`accent-${colorName}`)
}
})
}
}
safelist.push('page-content')
/** @type {import('tailwindcss').Config} */
module.exports = {
darkMode: ['class'],
safelist,
content: [
'./src/pages/**/*.{js,ts,jsx,tsx,mdx}',
'./src/components/**/*.{js,ts,jsx,tsx,mdx}',
'./src/app/**/*.{js,ts,jsx,tsx,mdx}',
],
theme: {
container: {
center: true,
padding: '2rem',
screens: {
'2xl': '1400px',
},
},
fontFamily: {
serif: [
'var(--font-eksell-large), ui-serif, Georgia, Cambria, "Times New Roman", Times, serif',
],
'serif-small': [
'var(--font-eksell-small), ui-serif, Georgia, Cambria, "Times New Roman", Times, serif',
],
'sans-serif': [
'var(--font-silka), ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',
],
},
extend: {
colors: {
border: 'red',
input: 'hsl(var(--input))',
ring: 'red',
background: 'hsl(var(--background))',
foreground: 'hsl(var(--foreground))',
destructive: {
DEFAULT: 'hsl(var(--destructive))',
foreground: 'hsl(var(--destructive-foreground))',
},
muted: {
DEFAULT: 'red',
foreground: 'hsl(var(--muted-foreground))',
},
popover: {
DEFAULT: 'var(--primary-800)',
foreground: 'hsl(var(--popover-foreground))',
},
card: {
DEFAULT: 'red',
foreground: 'hsl(var(--card-foreground))',
},
primary: {
DEFAULT: 'var(--primary-600)',
50: 'rgb(var(--primary-50)',
100: 'var(--primary-100)',
200: 'var(--primary-200)',
300: 'var(--primary-300)',
400: 'var(--primary-400)',
500: 'var(--primary-500)',
600: 'var(--primary-600)',
700: 'var(--primary-700)',
800: 'var(--primary-800)',
900: 'var(--primary-900)',
},
accent: {
DEFAULT: 'var(--accent-600)',
50: 'var(--accent-50)',
100: 'var(--accent-100)',
200: 'var(--accent-200)',
300: 'var(--accent-300)',
400: 'var(--accent-400)',
500: 'var(--accent-500)',
600: 'var(--accent-600)',
700: 'var(--accent-700)',
800: 'var(--accent-800)',
900: 'var(--accent-900)',
},
body: 'var(--textBody)',
},
keyframes: {
'accordion-down': {
from: { height: 0 },
to: { height: 'var(--radix-accordion-content-height)' },
},
'accordion-up': {
from: { height: 'var(--radix-accordion-content-height)' },
to: { height: 0 },
},
},
animation: {
'accordion-down': 'accordion-down 0.2s ease-out',
'accordion-up': 'accordion-up 0.2s ease-out',
},
},
},
plugins: [
require('tailwindcss-animate'),
function ({ addVariant }) {
addVariant('child', '& > *')
addVariant('child-hover', '& > *:hover')
addVariant('visibleChild', '& > :not([hidden]) ~ :not([hidden])')
addVariant('activeLink', '&.active')
addVariant('nextDiv', '& + div')
addVariant('in-view', '&.is-inview')
},
],
}