-
Notifications
You must be signed in to change notification settings - Fork 27
/
tailwind.config.ts
172 lines (168 loc) · 5.47 KB
/
tailwind.config.ts
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
const svgToDataUri = require('mini-svg-data-uri')
const {
default: flattenColorPalette,
} = require('tailwindcss/lib/util/flattenColorPalette')
/** @type {import('tailwindcss').Config} */
module.exports = {
darkMode: ['class'],
content: [
'./components/**/*.{ts,tsx}',
'./app/**/*.{ts,tsx}',
'./src/**/*.{ts,tsx}',
],
theme: {
container: {
center: true,
padding: '2rem',
screens: {
'2xl': '1400px',
},
},
extend: {
colors: {
base: 'var(--base)',
transparent: 'var(--transparent)',
background: 'var(--background)',
'background-gradient': 'var(--background-gradient)',
foreground: 'var(--primary-50)',
link: 'var(--link)',
// ShadCN colors
// primary: 'var(--base)',
// 'primary-foreground': 'var(--foreground)',
// destructive: 'var(--error-600)',
// 'primary-foreground': 'var(--foreground)',
accent: 'rgba(255,255,255,0.05)',
'accent-foreground': 'var(--foreground)',
input: 'var(--primary-700)',
'input-foreground': 'var(--foreground)',
secondary: 'var(--primary-800)',
'secondary-foreground': 'var(--foreground)',
card: 'var(--primary-950)',
'card-foreground': 'var(--foreground)',
border: 'rgba(255, 255, 255, 0.1)',
muted: 'var(--primary-800)',
'muted-foreground': 'var(--primary-500)',
// Primary colors
primary: {
50: '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)',
950: 'var(--primary-950)',
},
error: {
50: 'var(--error-50)',
100: 'var(--error-100)',
200: 'var(--error-200)',
300: 'var(--error-300)',
400: 'var(--error-400)',
500: 'var(--error-500)',
600: 'var(--error-600)',
700: 'var(--error-700)',
800: 'var(--error-800)',
900: 'var(--error-900)',
950: 'var(--error-950)',
},
warning: {
50: 'var(--warning-50)',
100: 'var(--warning-100)',
200: 'var(--warning-200)',
300: 'var(--warning-300)',
400: 'var(--warning-400)',
500: 'var(--warning-500)',
600: 'var(--warning-600)',
700: 'var(--warning-700)',
800: 'var(--warning-800)',
900: 'var(--warning-900)',
950: 'var(--warning-950)',
},
success: {
50: 'var(--success-50)',
100: 'var(--success-100)',
200: 'var(--success-200)',
300: 'var(--success-300)',
400: 'var(--success-400)',
500: 'var(--success-500)',
600: 'var(--success-600)',
700: 'var(--success-700)',
800: 'var(--success-800)',
900: 'var(--success-900)',
950: 'var(--success-950)',
},
blue: {
50: 'var(--blue-50)',
100: 'var(--blue-100)',
200: 'var(--blue-200)',
300: 'var(--blue-300)',
400: 'var(--blue-400)',
500: 'var(--blue-500)',
600: 'var(--blue-600)',
700: 'var(--blue-700)',
800: 'var(--blue-800)',
900: 'var(--blue-900)',
950: 'var(--blue-950)',
},
borderRadius: {
lg: 'var(--radius)',
md: 'calc(var(--radius) - 2px)',
sm: 'calc(var(--radius) - 4px)',
},
},
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',
},
boxShadow: {
sm: '0px 10px 10px 0px rgba(0, 0, 0, 0.15), 0px 4px 4px 0px rgba(0, 0, 0, 0.10), 0px 1px 0px 0px rgba(0, 0, 0, 0.05)',
md: '0px 10px 20px 0px rgba(0, 0, 0, 0.20), 0px 5px 10px 0px rgba(0, 0, 0, 0.10), 0px 2px 4px 0px rgba(0, 0, 0, 0.10)',
lg: '0px 15px 30px 0px rgba(0, 0, 0, 0.20), 0px 10px 20px 0px rgba(0, 0, 0, 0.15), 0px 3px 6px 0px rgba(0, 0, 0, 0.10)',
xl: '0px 20px 40px 0px rgba(0, 0, 0, 0.25), 0px 15px 30px 0px rgba(0, 0, 0, 0.15), 0px 5px 10px 0px rgba(0, 0, 0, 0.05)',
},
},
},
plugins: [
require('tailwindcss-animate'),
function ({ matchUtilities, theme }: { matchUtilities: any; theme: any }) {
matchUtilities(
{
'bg-grid': (value: string) => ({
backgroundImage: `url("${svgToDataUri(
`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="${value}"><path d="M0 .5H31.5V32"/></svg>`,
)}")`,
}),
},
{
values: flattenColorPalette(theme('backgroundColor')),
type: 'color',
},
)
matchUtilities(
{
highlight: (value: string) => ({
boxShadow: `inset 0 1px 0 0 ${value}`,
}),
},
{
values: flattenColorPalette(theme('backgroundColor')),
type: 'color',
},
)
},
],
}