-
Notifications
You must be signed in to change notification settings - Fork 0
/
tailwind.config.ts
146 lines (143 loc) · 4.2 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
import type { Config } from "tailwindcss";
import animate from "tailwindcss-animated";
import plugin from "tailwindcss/plugin";
import typography from "@tailwindcss/typography";
import forms from "@tailwindcss/forms";
export const config: Config = {
content: [
"./index.html",
"./src/**/*.{js,ts,jsx,tsx,css,md,mdx,html,json,scss}",
],
theme: {
screens: {
mobile: { raw: "not (min-width: 640px)" },
sm: "640px",
nmd: { raw: "not (min-width: 932px)" },
md: "932px",
lg: "1024px",
xl: "1280px",
"2xl": "1836px",
},
extend: {
colors: {
status: {
success: "rgb(var(--success), <alpha-value>)",
warning: "rgb(var(--warning), <alpha-value>)",
critical: "rgb(var(--critical), <alpha-value>)",
special: "rgb(var(--special), <alpha-value>)",
},
background: {
10: "rgb(var(--background-10), <alpha-value>)",
20: "rgb(var(--background-20), <alpha-value>)",
30: "rgb(var(--background-30), <alpha-value>)",
40: "rgb(var(--background-40), <alpha-value>)",
50: "rgb(var(--background-50), <alpha-value>)",
60: "rgb(var(--background-60), <alpha-value>)",
70: "rgb(var(--background-70), <alpha-value>)",
80: "rgb(var(--background-80), <alpha-value>)",
90: "rgb(var(--background-90), <alpha-value>)",
},
"accent-background": {
10: "rgb(var(--accent-background-10), <alpha-value>)",
20: "rgb(var(--accent-background-20), <alpha-value>)",
30: "rgb(var(--accent-background-30), <alpha-value>)",
40: "rgb(var(--accent-background-40), <alpha-value>)",
50: "rgb(var(--accent-background-50), <alpha-value>)",
60: "rgb(var(--accent-background-60), <alpha-value>)",
},
},
fontSize: {
DEFAULT: "calc(var(--font-size-standard) / 16)",
},
fontWeight: {
DEFAULT: "500",
},
color: {
DEFAULT: "rgb(var(--default-color), <alpha-value>)",
},
textShadow: {
sm: "0 1px 2px var(--tw-shadow-color)",
DEFAULT: "0 2px 4px var(--tw-shadow-color)",
lg: "0 8px 16px var(--tw-shadow-color)",
},
transitionProperty: {
height: "height",
carousel: "left scale transform",
rotation: "rotate",
},
keyframes: {
explode: {
"0%": {
"transform-origin": "-100% 50%",
transform: "scale(0)",
rotate: "0deg",
opacity: "1",
},
"70%": { transform: "scale(100%)" },
"100%": { transform: "scale(100%)", rotate: "360deg", opacity: "0" },
},
floating: {
"0%": {
transform: "translateY(0%)",
},
"50%": {
transform: "translateY(3%)",
},
"100%": {
transform: "translateY(0%)",
},
},
},
animation: {
explode: "explode 6s ease-out",
floating: "floating 12s cubic-bezier(0.64, 0.57, 0.67, 1.53) infinite",
},
},
data: {
checked: "checked=true",
},
},
plugins: [
forms,
animate,
typography,
plugin(function ({ addUtilities }) {
const textConfig = (fontSize: any, fontWeight: any) => ({
fontSize,
fontWeight,
});
addUtilities({
".text-main-title": textConfig(
"calc(var(--font-size-title) / 16)",
700
),
".text-section-title": textConfig(
"calc(var(--font-size-section-title) / 16)",
700
),
".text-standard": textConfig(
"calc(var(--font-size-standard) / 16)",
500
),
".text-standard-bold": textConfig(
"calc(var(--font-size-standard) / 16)",
700
),
});
}),
plugin(function ({ addVariant }) {
addVariant("checked-hover", ["&:hover", "&[data-checked=true]"]);
}),
plugin(function ({ matchUtilities, theme }) {
matchUtilities(
{
"text-shadow": (value) => ({
textShadow: value,
}),
},
{ values: theme("textShadow") }
);
}),
],
};
export default config;