-
Notifications
You must be signed in to change notification settings - Fork 0
/
tailwind.config.ts
165 lines (161 loc) · 4.68 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
import type { Config } from "tailwindcss";
import { nextui } from "@nextui-org/react";
const {
default: flattenColorPalette,
} = require("tailwindcss/lib/util/flattenColorPalette");
export default {
content: [
"./app/**/*.{js,jsx,ts,tsx}",
"./node_modules/@nextui-org/theme/dist/**/*.{js,ts,jsx,tsx}",
],
safelist: [
'group/line',
'group-hover/line:opacity-100',
],
theme: {
extend: {
keyframes: {
"scrolling-banner": {
from: { transform: "translateX(0)" },
to: { transform: "translateX(calc(-50% - var(--gap)/2))" },
},
"scrolling-banner-vertical": {
from: { transform: "translateY(0)" },
to: { transform: "translateY(calc(-50% - var(--gap)/2))" },
},
moveHorizontal: {
"0%": {
transform: "translateX(-50%) translateY(-10%)",
},
"50%": {
transform: "translateX(50%) translateY(10%)",
},
"100%": {
transform: "translateX(-50%) translateY(-10%)",
},
},
moveInCircle: {
"0%": {
transform: "rotate(0deg)",
},
"50%": {
transform: "rotate(180deg)",
},
"100%": {
transform: "rotate(360deg)",
},
},
moveVertical: {
"0%": {
transform: "translateY(-50%)",
},
"50%": {
transform: "translateY(50%)",
},
"100%": {
transform: "translateY(-50%)",
},
},
marquee: {
from: { transform: "translateX(0)" },
to: { transform: "translateX(calc(-100% - var(--gap)))" },
},
"marquee-vertical": {
from: { transform: "translateY(0)" },
to: { transform: "translateY(calc(-100% - var(--gap)))" },
},
},
animation: {
"scrolling-banner": "scrolling-banner var(--duration) linear infinite",
"scrolling-banner-vertical": "scrolling-banner-vertical var(--duration) linear infinite",
first: "moveVertical 30s ease infinite",
second: "moveInCircle 20s reverse infinite",
third: "moveInCircle 40s linear infinite",
fourth: "moveHorizontal 40s ease infinite",
fifth: "moveInCircle 20s ease infinite",
marquee: "marquee var(--duration) linear infinite",
"marquee-vertical": "marquee-vertical var(--duration) linear infinite",
},
},
},
darkMode: "class",
plugins: [
addVariablesForColors,
nextui(
{
themes: {
light: {
layout: {},
colors: {
background: {
DEFAULT: "#4fafc1",
400: "#4fafc1",
50: "#f0fafb",
100: "#d9f0f4",
200: "#b8e3e9",
300: "#87cdd9",
500: "#3393a7",
600: "#2e788c",
700: "#2b6273",
800: "#2a5260",
900: "#274552",
},
primary: {
foreground: "#ffffff",
DEFAULT: "#ffffff",
50: "#ffffff",
100: "#ffffff",
200: "#ffffff",
300: "#ffffff",
400: "#ffffff",
500: "#ffffff",
600: "#ffffff",
700: "#ffffff",
800: "#ffffff",
900: "#ffffff",
},
secondary:
{
DEFAULT: "#e0c72f",
50: "#fcfbea",
100: "#f7f7ca",
200: "#f1eb97",
300: "#ebde6c",
400: "#e0c72f",
500: "#d1b021",
600: "#b48b1a",
700: "#906618",
800: "#78511b",
900: "#66441d",
},
default: {
foreground: "#ffffff",
DEFAULT: "#ffffff",
50: "#ffffff",
100: "#ffffff",
200: "#ffffff",
300: "#ffffff",
400: "#ffffff",
500: "#ffffff",
600: "#ffffff",
700: "#ffffff",
800: "#ffffff",
900: "#ffffff",
},
}
}
}
}
)
]
} satisfies 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 newVars = Object.fromEntries(
Object.entries(allColors).map(([key, val]) => [`--${key}`, val])
);
addBase({
":root": newVars,
});
}