-
Notifications
You must be signed in to change notification settings - Fork 0
/
tailwind.config.mjs
190 lines (186 loc) Β· 5.79 KB
/
tailwind.config.mjs
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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
import tailwindcssAnimate from "tailwindcss-animate"
import defaultTheme from "tailwindcss/defaultTheme"
function hsla(variable) {
return `hsla(var(--${variable}) / <alpha-value>)`
}
/** @type {import('tailwindcss').Config} */
const config = {
content: [
"./pages/**/*.{js,ts,jsx,tsx,mdx,md}",
"./components/**/*.{js,ts,jsx,tsx,mdx,md}",
"./app/**/*.{js,ts,jsx,tsx,mdx,md}",
"./content/**/*.{js,ts,jsx,tsx,mdx,md}",
],
darkMode: ["class"],
safelist: ["light", "dark"],
plugins: [tailwindcssAnimate],
theme: {
screens: {
xss: "320px",
xs: "392px",
sm: "640px",
md: "768px",
lg: "1024px",
xl: "1325px",
"2xl": "1536px",
// usually I think in terms of this for design
// isMobile to isDesktop should have no gap ergo
// -1 so it doesn't encompass 768
isMobile: { max: "767px" },
isDesktop: "768px",
},
fontFamily: {
heading: ["var(--font-heading)", ...defaultTheme.fontFamily.sans],
body: ["var(--font-body)", ...defaultTheme.fontFamily.sans],
mono: ["var(--font-mono)", ...defaultTheme.fontFamily.mono],
},
zIndex: {
auto: "auto",
docked: "10",
dropdown: "1000",
sticky: "1100",
banner: "1200",
overlay: "1300",
modal: "1400",
popover: "1500",
skipLink: "1600",
toast: "1700",
tooltip: "1800",
0: "0",
// although generally the semantic tokens should be used for zindices
// 1 and 2 are acceptable if scoped properly imho
1: "1",
2: "2",
},
colors: {
transparent: "transparent",
black: hsla("black"),
white: hsla("white"),
background: hsla("background"),
foreground: hsla("foreground"),
border: hsla("border"),
knockout: {
DEFAULT: hsla("knockout"),
foreground: hsla("knockout-foreground"),
},
content: {
DEFAULT: hsla("content"),
foreground: hsla("content-foreground"),
},
primary: {
DEFAULT: hsla("primary"),
foreground: hsla("primary-foreground"),
},
secondary: {
DEFAULT: hsla("secondary"),
foreground: hsla("secondary-foreground"),
},
muted: {
DEFAULT: hsla("muted"),
foreground: hsla("muted-foreground"),
},
accent: {
DEFAULT: hsla("accent"),
foreground: hsla("accent-foreground"),
},
border: hsla("border"),
input: hsla("input"),
ring: hsla("ring"),
card: {
DEFAULT: hsla("card"),
foreground: hsla("card-foreground"),
},
popover: {
DEFAULT: hsla("popover"),
foreground: hsla("popover-foreground"),
},
link: {
foreground: hsla("link-foreground"),
border: hsla("link-border"),
"border-active": hsla("link-border-active"),
},
info: {
DEFAULT: hsla("info"),
foreground: hsla("info-foreground"),
"link-border": hsla("info-link-border"),
"link-border-active": hsla("info-link-border-active"),
border: hsla("info-border"),
},
success: {
DEFAULT: hsla("success-background"),
foreground: hsla("success-foreground"),
"link-border": hsla("success-link-border"),
"link-border-active": hsla("success-link-border-active"),
border: hsla("success-border"),
},
critical: {
DEFAULT: hsla("critical-background"),
foreground: hsla("critical-foreground"),
"link-border": hsla("critical-link-border"),
"link-border-active": hsla("critical-link-border-active"),
border: hsla("critical-border"),
},
warning: {
DEFAULT: hsla("warning-background"),
foreground: hsla("warning-foreground"),
"link-border": hsla("warning-link-border"),
"link-border-active": hsla("warning-link-border-active"),
border: hsla("warning-border"),
},
danger: {
DEFAULT: hsla("danger-background"),
foreground: hsla("danger-foreground"),
"link-border": hsla("danger-link-border"),
"link-border-active": hsla("danger-link-border-active"),
border: hsla("danger-border"),
},
},
extend: {
transitionProperty: {
background: "background",
},
backgroundPosition: {
underline: "0 100%",
},
backgroundSize: {
"subtle-underline": "100% 0.0625em",
"stark-underline": "100% 0.078125em",
"link-hide": "0% 0.05em",
"link-show": "100% 0.05em",
full: "100%",
},
transitionTimingFunction: {
"arrow-ease": "cubic-bezier(0.87, 0, 0.13, 1)",
},
keyframes: {
"collapsible-slide-up": {
from: { height: "var(--radix-collapsible-content-height)" },
to: { height: "0" },
},
"collapsible-slide-down": {
from: { height: "0" },
to: { height: "var(--radix-collapsible-content-height)" },
},
/* https://jarv.is/notes/css-waving-hand-emoji/ */
waving: {
"0%": { transform: "rotate( 0.0deg)" },
"10%": {
transform: "rotate(14.0deg)",
} /* The following five values can be played with to make the waving more or less extreme */,
"20%": { transform: "rotate(-8.0deg)" },
"30%": { transform: "rotate(14.0deg)" },
"40%": { transform: "rotate(-4.0deg)" },
"50%": { transform: "rotate(10.0deg)" },
"60%": { transform: "rotate( 0.0deg)" } /* Reset for the last half to pause */,
"100%": { transform: "rotate( 0.0deg)" },
},
},
animation: {
"collapsible-open": "collapsible-slide-down 300ms ease-out",
"collapsible-close": "collapsible-slide-up 300ms ease-out",
wave: "waving 2.5s infinite",
},
},
},
}
export default config