-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtailwind.config.ts
81 lines (77 loc) · 2.02 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
import type { Config } from "tailwindcss";
import { nextui } from "@nextui-org/react";
import { default as flattenColorPalette } from "tailwindcss/lib/util/flattenColorPalette";
/** @type {import('tailwindcss').Config} */
const config: Config = {
content: [
"./src/ui/**/*.{js,ts,jsx,tsx,mdx}",
"./src/app/**/*.{js,ts,jsx,tsx,mdx}",
"./node_modules/@nextui-org/theme/dist/**/*.{js,ts,jsx,tsx}",
],
theme: {
extend: {
animation: {
aurora: "aurora 60s linear infinite",
},
keyframes: {
aurora: {
from: {
backgroundPosition: "50% 50%, 50% 50%",
},
to: {
backgroundPosition: "350% 50%, 350% 50%",
},
},
},
},
},
darkMode: "class",
plugins: [
addVariablesForColors,
nextui({
themes: {
dark: {
colors: {
primary: {
DEFAULT: "#a76abe",
50: "#fbf8fc",
100: "#f5eef9",
200: "#eee0f4",
300: "#e0c7eb",
400: "#cca3dd",
500: "#b77fcd",
600: "#a76abe",
700: "#8c4ea2",
800: "#5f386b",
900: "#411f4c",
},
secondary: {
DEFAULT: "#d03560",
50: "#fcf3f6",
100: "#fbe8f0",
200: "#f8d2e2",
300: "#f4adc8",
400: "#ec7aa3",
500: "#e15381",
600: "#d03560",
700: "#b32347",
800: "#7c1f34",
900: "#4b0c1a",
},
},
},
},
}),
],
};
export default config;
// This plugin adds each Tailwind color as a global CSS variable, e.g. var(--gray-200).
function addVariablesForColors({ addBase, theme }: any) {
const allColors = flattenColorPalette(theme("colors"));
const newVariables = Object.fromEntries(
Object.entries(allColors).map(([key, value]) => [`--${key}`, value]),
);
addBase({
":root": newVariables,
});
}