-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtailwind.config.ts
61 lines (57 loc) · 1.63 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
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable @typescript-eslint/ban-ts-comment */
import type { Config } from "tailwindcss";
// @ts-ignore
import flattenColorPalette from "tailwindcss/lib/util/flattenColorPalette";
export default {
darkMode: "class",
content: [
"./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
"./src/components/**/*.{js,ts,jsx,tsx,mdx}",
"./src/app/**/*.{js,ts,jsx,tsx,mdx}",
],
theme: {
extend: {
colors: {
background: "var(--background)",
foreground: "var(--foreground)",
seasalt: "#F8FAFC",
mediumslateblue: "#726DD1",
secondary: "#E1E7FE",
primary: "#4F44E5",
oxfordblue: "#171B2D",
battleshipgray: "#888D93",
},
fontFamily: {
PaytoneOne: ["Paytone One", "sans-serif"],
RobotoSerifVar: ["Roboto Serif Variable", "serif"],
},
animation: {
spotlight: "spotlight 2s ease .75s 1 forwards",
},
keyframes: {
spotlight: {
"0%": {
opacity: "0",
transform: "translate(-72%, -62%) scale(0.5)",
},
"100%": {
opacity: "1",
transform: "translate(-50%,-40%) scale(1)",
},
},
},
},
},
plugins: [addVariablesForColors],
} satisfies Config;
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,
});
}