-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
tailwind.config.cjs
208 lines (181 loc) · 6.76 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
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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
// @ts-nocheck
const path = require("node:path");
const black = "black";
const white = "white";
/** @type {import('tailwindcss/tailwind-config').TailwindConfig} */
module.exports = {
content: [
path.join(__dirname, "blog/**/*.{ts,tsx,md}"),
path.join(__dirname, "guide/**/*.{ts,tsx,md}"),
path.join(__dirname, "components/**/*.{ts,tsx,md}"),
path.join(__dirname, "examples/**/*.{ts,tsx,md}"),
path.join(__dirname, "website/app/**/*.{ts,tsx}"),
path.join(__dirname, "website/components/**/*.{ts,tsx}"),
path.join(__dirname, "website/icons/**/*.{ts,tsx}"),
],
darkMode: "selector",
theme: {
extend: {
colors: {
inherit: "inherit",
black,
white,
gray: {
50: "hsl(204 20% 99%)",
100: "hsl(204 20% 96%)",
150: "hsl(204 20% 94%)",
200: "hsl(204 20% 91%)",
250: "hsl(204 20% 88%)",
300: "hsl(204 20% 82%)",
350: "hsl(204 10% 70%)",
400: "hsl(204 8% 50%)",
450: "hsl(204 4% 40%)",
500: "hsl(204 4% 32%)",
550: "hsl(204 4% 28%)",
600: "hsl(204 4% 24%)",
650: "hsl(204 4% 20%)",
700: "hsl(204 4% 16%)",
750: "hsl(204 4% 14%)",
800: "hsl(204 4% 12%)",
850: "hsl(204 4% 10%)",
900: "hsl(204 4% 8%)",
950: "hsl(204 4% 6%)",
},
blue: {
50: "hsl(204 100% 90%)",
100: "hsl(204 100% 86%)",
200: "hsl(204 100% 80%)",
300: "hsl(204 100% 72%)",
400: "hsl(204 100% 64%)",
500: "hsl(204 100% 58%)",
600: "hsl(204 100% 40%)",
700: "hsl(204 100% 35%)",
800: "hsl(204 100% 32%)",
900: "hsl(204 100% 30%)",
},
red: {
50: "hsl(357 100% 90%)",
100: "hsl(357 56% 90%)",
200: "hsl(357 56% 86%)",
300: "hsl(357 56% 80%)",
400: "hsl(357 56% 72%)",
500: "hsl(357 56% 64%)",
600: "hsl(357 56% 50%)",
700: "hsl(357 56% 42%)",
800: "hsl(357 100% 30%)",
900: "hsl(357 56% 30%)",
},
},
},
dropShadow: {
sm: "drop-shadow(0 1px 1px rgb(0 0 0 / 0.05))",
"sm-dark": "drop-shadow(0 1px 1px rgb(0 0 0 / 0.15))",
DEFAULT:
"drop-shadow(0 1px 2px rgb(0 0 0 / 0.1)) drop-shadow(0 1px 1px rgb(0 0 0 / 0.06))",
dark: "drop-shadow(0 1px 2px rgb(0 0 0 / 0.3)) drop-shadow(0 1px 1px rgb(0 0 0 / 0.06))",
md: "drop-shadow(0 4px 3px rgb(0 0 0 / 0.07)) drop-shadow(0 2px 2px rgb(0 0 0 / 0.06))",
"md-dark":
"drop-shadow(0 4px 3px rgb(0 0 0 / 0.21)) drop-shadow(0 2px 2px rgb(0 0 0 / 0.06))",
lg: "drop-shadow(0 10px 8px rgb(0 0 0 / 0.04)) drop-shadow(0 4px 3px rgb(0 0 0 / 0.1))",
"lg-dark":
"drop-shadow(0 10px 8px rgb(0 0 0 / 0.12)) drop-shadow(0 4px 3px rgb(0 0 0 / 0.1))",
xl: "drop-shadow(0 18px 10px rgb(0 0 0 / 0.04)) drop-shadow(0 8px 5px rgb(0 0 0 / 0.1))",
"xl-dark":
"drop-shadow(0 18px 10px rgb(0 0 0 / 0.12)) drop-shadow(0 8px 5px rgb(0 0 0 / 0.1))",
"2xl": "drop-shadow(0 25px 20px rgb(0 0 0 / 0.15))",
"2xl-dark": "drop-shadow(0 25px 20px rgb(0 0 0 / 0.34))",
none: "drop-shadow(0 0 #0000)",
},
boxShadow: {
sm: "0 1px 2px 0 rgb(0 0 0 / 0.05)",
"sm-dark": "0 1px 2px 0 rgb(0 0 0 / 0.15)",
DEFAULT: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",
dark: "0 1px 3px 0 rgb(0 0 0 / 0.25), 0 1px 2px -1px rgb(0 0 0 / 0.1)",
md: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
"md-dark":
"0 4px 6px -1px rgb(0 0 0 / 0.25), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",
"lg-dark":
"0 10px 15px -3px rgb(0 0 0 / 0.25), 0 4px 6px -4px rgb(0 0 0 / 0.1)",
xl: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.08)",
"xl-dark":
"0 20px 25px -5px rgb(0 0 0 / 0.25), 0 8px 10px -6px rgb(0 0 0 / 0.08)",
"2xl": "0 25px 50px -12px rgb(0 0 0 / 0.25)",
"2xl-dark": "0 25px 50px -12px rgb(0 0 0 / 0.75)",
inner: "inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",
"inner-dark": "inset 0 2px 4px 0 rgb(0 0 0 / 0.15)",
button: "inset 0 -1px 2px 0 rgb(0 0 0 / 0.05)",
"button-dark":
"0 1px 2px 0 rgb(0 0 0 / 0.15), inset 0 1px 0 0 rgb(255 255 255 / 0.05)",
input:
"inset 0 0 0 1px rgba(0 0 0 / 0.1), inset 0 2px 5px 0 rgba(0 0 0 / 0.05)",
"input-dark":
"inset 0 0 0 1px rgba(255 255 255 / 0.12), inset 0 -1px 0 0 rgba(255 255 255 / 0.05), inset 0 2px 5px 0 rgba(0 0 0 / 0.15)",
none: "0 0 #0000",
},
fontFamily: {
mono: ["Menlo", "Consolas", "Courier New", "monospace"],
},
},
corePlugins: {
backgroundOpacity: false,
borderOpacity: false,
textOpacity: false,
dropShadow: false,
boxShadow: false,
},
plugins: [
require("tailwindcss-animate"),
{
handler: ({ addUtilities, matchUtilities, addVariant, theme }) => {
const dropShadow = theme("dropShadow");
const dropShadowUtils = Object.entries(dropShadow).reduce(
(acc, [key, shadow]) => {
acc[`.drop-shadow${key === "DEFAULT" ? "" : `-${key}`}`] = {
filter: shadow,
};
return acc;
},
{},
);
addUtilities(dropShadowUtils);
const boxShadow = theme("boxShadow");
const boxShadowUtils = Object.entries(boxShadow).reduce(
(acc, [key, shadow]) => {
acc[`.shadow${key === "DEFAULT" ? "" : `-${key}`}`] = {
"box-shadow": `${shadow}`,
};
return acc;
},
{},
);
addUtilities(boxShadowUtils);
addUtilities({
".ariakit-outline": {
outline: `2px solid ${theme("colors.blue.600")}`,
outlineOffset: "2px",
},
".ariakit-outline-input": {
outline: `2px solid ${theme("colors.blue.600")}`,
outlineOffset: "-1px",
},
});
addVariant(
"supports-backdrop-blur",
"@supports (backdrop-filter: blur(0)) or (-webkit-backdrop-filter: blur(0))",
);
addVariant("enter", "&[data-enter]");
addVariant("leave", "&[data-leave]");
addVariant("active-item", "&[data-active-item]");
addVariant("group-active-item", ":merge(.group)[data-active-item] &");
addVariant("active", ["&:active", "&[data-active]"]);
addVariant("ariakit-focus-visible", "&[data-focus-visible]");
addVariant("focus-visible", [
"&:focus-visible",
"&[data-focus-visible]",
]);
addVariant("aria-invalid", '&[aria-invalid="true"]');
},
},
],
};