-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtailwind.config.js
44 lines (40 loc) · 926 Bytes
/
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
/** @type {import('tailwindcss').Config} */
import flattenColorPalette from "tailwindcss/lib/util/flattenColorPalette";
export default {
content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"],
darkMode: "class",
theme: {
extend: {
backgroundImage: {
"noise-bg": "url('/noise.png')",
},
colors: {
yellow: {
500: "#EAB308",
},
red: {
500: "#EF4444",
},
blue: {
500: "#3B82F6",
},
cyan: {
500: "#06B6D4",
},
violet: {
500: "#8B5CF6",
},
},
},
},
plugins: [addVariablesForColors],
};
function addVariablesForColors({ addBase, theme }) {
let allColors = flattenColorPalette(theme("colors"));
let newVars = Object.fromEntries(
Object.entries(allColors).map(([key, val]) => [`--${key}`, val])
);
addBase({
":root": newVars,
});
}