forked from livekit/agents-playground
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtailwind.config.js
More file actions
115 lines (110 loc) · 2.18 KB
/
tailwind.config.js
File metadata and controls
115 lines (110 loc) · 2.18 KB
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
/** @type {import('tailwindcss').Config} */
const colors = require("tailwindcss/colors");
const shades = [
"50",
"100",
"200",
"300",
"400",
"500",
"600",
"700",
"800",
"900",
"950",
];
const colorList = [
"gray",
"green",
"cyan",
"amber",
"violet",
"blue",
"rose",
"pink",
"teal",
"red",
];
const uiElements = [
"bg",
"selection:bg",
"border",
"text",
"hover:bg",
"hover:border",
"hover:text",
"ring",
"focus:ring",
];
const customColors = {
cyan: colors.cyan,
green: colors.green,
amber: colors.amber,
violet: colors.violet,
blue: colors.blue,
rose: colors.rose,
pink: colors.pink,
teal: colors.teal,
red: colors.red,
};
let customShadows = {};
let shadowNames = [];
let textShadows = {};
let textShadowNames = [];
for (const [name, color] of Object.entries(customColors)) {
customShadows[`${name}`] = `0px 0px 10px ${color["500"]}`;
customShadows[`lg-${name}`] = `0px 0px 20px ${color["600"]}`;
textShadows[`${name}`] = `0px 0px 4px ${color["700"]}`;
textShadowNames.push(`drop-shadow-${name}`);
shadowNames.push(`shadow-${name}`);
shadowNames.push(`shadow-lg-${name}`);
shadowNames.push(`hover:shadow-${name}`);
}
const safelist = [
"bg-black",
"bg-white",
"transparent",
"object-cover",
"object-contain",
...shadowNames,
...textShadowNames,
...shades.flatMap((shade) => [
...colorList.flatMap((color) => [
...uiElements.flatMap((element) => [`${element}-${color}-${shade}`]),
]),
]),
];
module.exports = {
content: ["./src/**/*.{js,ts,jsx,tsx,mdx}"],
theme: {
colors: {
transparent: "transparent",
current: "currentColor",
black: colors.black,
white: colors.white,
gray: colors.neutral,
...customColors,
},
extend: {
dropShadow: {
...textShadows,
},
boxShadow: {
...customShadows,
},
keyframes: {
"fade-in-out": {
"0%": { opacity: "0" },
"20%": { opacity: "1" },
"80%": { opacity: "1" },
"100%": { opacity: "0" },
},
},
animation: {
"fade-in-out": "fade-in-out 1s ease-in-out",
},
},
},
plugins: [],
safelist,
};