-
Notifications
You must be signed in to change notification settings - Fork 0
/
tailwind.config.ts
108 lines (104 loc) · 3.22 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
import type { Config } from "tailwindcss"
type OpacityFunction = (params: { opacityValue: any }) => string;
// Define the makePrimaryColor function
const makePrimaryColor = (l: number): OpacityFunction => {
return ({ opacityValue }) => {
if (opacityValue === undefined) {
return `hsl(var(--nextra-primary-hue) 100% ${l}%)`;
}
return `hsl(var(--nextra-primary-hue) 100% ${l}% / ${opacityValue})`;
};
};
const config = {
darkMode: ["class"],
content: [
'./pages/**/*.{js,jsx,ts,tsx,md,mdx}',
'./components/**/*.{js,jsx,ts,tsx,md,mdx}',
'./theme.config.tsx'
],
prefix: "",
theme: {
screens: {
sm: "640px",
md: "768px",
lg: "1024px",
xl: "1280px",
"2xl": "1536px"
},
fontSize: {
xs: ".75rem",
sm: ".875rem",
base: "1rem",
lg: "1.125rem",
xl: "1.25rem",
"2xl": "1.5rem",
"3xl": "1.875rem",
"4xl": "2.25rem",
"5xl": "3rem",
"6xl": "4rem"
},
letterSpacing: {
tight: "-0.015em"
},
container: {
center: true,
padding: "2rem",
screens: {
"2xl": "1400px",
},
},
extend: {
colors: {
dark: "#111",
primary: {
50: makePrimaryColor(97)({ opacityValue: undefined }),
100: makePrimaryColor(94)({ opacityValue: undefined }),
200: makePrimaryColor(86)({ opacityValue: undefined }),
300: makePrimaryColor(77)({ opacityValue: undefined }),
400: makePrimaryColor(66)({ opacityValue: undefined }),
500: makePrimaryColor(50)({ opacityValue: undefined }),
600: makePrimaryColor(45)({ opacityValue: undefined }),
700: makePrimaryColor(39)({ opacityValue: undefined }),
750: makePrimaryColor(35)({ opacityValue: undefined }),
800: makePrimaryColor(32)({ opacityValue: undefined }),
900: makePrimaryColor(24)({ opacityValue: undefined }),
},
},
keyframes: {
"accordion-down": {
from: { height: "0" },
to: { height: "var(--radix-accordion-content-height)" },
},
"accordion-up": {
from: { height: "var(--radix-accordion-content-height)" },
to: { height: "0" },
},
progress: {
"0%": {width: "0%"},
"100%": {width: "100%"}
},
noise: {
"0%": {transform: "translate(0,0)"},
"10%": {transform: "translate(-5%,-5%)"},
"20%": {transform: "translate(-10%,5%)"},
"30%": {transform: "translate(5%,-10%)"},
"40%": {transform: "translate(-5%,15%)"},
"50%": {transform: "translate(-10%,5%)"},
"60%": {transform: "translate(15%,0)"},
"70%": {transform: "translate(0,10%)"},
"80%": {transform: "translate(-15%,0)"},
"90%": {transform: "translate(10%,5%)"},
"100%": {transform: "translate(5%,0)"}
},
},
animation: {
"accordion-down": "accordion-down 0.2s ease-out",
"accordion-up": "accordion-up 0.2s ease-out",
progress: "progress 5s infinite",
noise: "noise .2s infinite;"
},
},
},
plugins: [require("tailwindcss-animate")],
} satisfies Config
export default config