forked from withastro/astro.build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tailwind.config.ts
319 lines (289 loc) · 8.52 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
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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
import type { Config } from "tailwindcss";
import plugin from "tailwindcss/plugin";
export default {
content: ["./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}"],
theme: {
fontFamily: {},
extend: {
aria: {
current: "current",
},
animation: {
float: "float 6s ease-in-out infinite",
},
keyframes: {
float: {
"0%, 100%": { transform: "translate3d(0px, -8px, 0)" },
"50%": { transform: "translate3d(0px, 8px, 0)" },
},
},
boxShadow: {
xs: "0px 1px 1px rgba(24, 24, 27, 0.06), 0px 0px 0px rgba(24, 24, 27, 0.08), 0px 0px 0px rgba(24, 24, 27, 0.08)",
sm: "0px 2px 1px rgba(24, 24, 27, 0.01), 0px 1px 1px rgba(24, 24, 27, 0.05), 0px 1px 1px rgba(24, 24, 27, 0.09), 0px 0px 0px rgba(24, 24, 27, 0.1), 0px 0px 0px rgba(24, 24, 27, 0.1);",
md: "0px 5px 2px rgba(24, 24, 27, 0.03), 0px 3px 2px rgba(24, 24, 27, 0.1), 0px 1px 1px rgba(24, 24, 27, 0.17), 0px 0px 1px rgba(24, 24, 27, 0.2), 0px 0px 0px rgba(24, 24, 27, 0.2);",
lg: "0px 25px 7px rgba(24, 24, 27, 0.01), 0px 16px 6px rgba(24, 24, 27, 0.04), 0px 9px 5px rgba(24, 24, 27, 0.15), 0px 4px 4px rgba(24, 24, 27, 0.26), 0px 1px 2px rgba(24, 24, 27, 0.29), 0px 0px 0px rgba(24, 24, 27, 0.3);",
},
colors: {
black: "#0D0F14",
// TODO: replace with brand off-white color
white: "#ffffff",
"astro-gray": {
100: "#F2F6FA",
200: "#BFC1C9",
300: "#858B98",
400: "#545864",
500: "#343841",
600: "#23262D",
700: "#17191E",
},
"astro-dark": {
100: "#858B98",
300: "#343841",
400: "#18191E",
500: "#4B4B4B",
600: "#2C2C2C",
700: "#11172A",
800: "#0C0F19",
900: "#060913",
},
"astro-blue": "#3245FF",
"astro-purple": "#BC52EE",
"astro-purple-dark": "#3F224D",
"astro-red": "#D83333",
"astro-pink": {
light: "#E8C4F9",
DEFAULT: "#F041FF",
},
"astro-orange": "#F8E42E",
"astro-yellow": "#FF7D54",
"astro-hover": "#E8C4F9",
},
backgroundImage: {
"blue-purple-gradient": "linear-gradient(83.21deg, #3245FF 0%, #B845ED 100%)",
"blue-green-gradient": "linear-gradient(247.23deg, #4AF2C8 0%, #2F4CB3 100%)",
"red-pink-gradient": "linear-gradient(66.77deg, #D83333 0%, #F041FF 100%)",
"orange-yellow-gradient": "linear-gradient(266.93deg, #F8E42E 0%, #FF7D54 100%)",
},
height: {
header: "5rem",
},
lineHeight: {
prose: "1.8125",
},
maxWidth: {
prose: "768px",
},
zIndex: {
blur: "-1",
grid: "-2",
},
},
},
corePlugins: {
container: false,
},
plugins: [
plugin(function fontPlugin({ addBase }) {
addBase({
"font-sans": {
fontFamily: ["Inter", "inter-fallback", "system-ui", "sans-serif"],
fontVariationSettings: "var(--sans-wght)",
fontFeatureSettings: [
"var(--sans-case)",
"var(--sans-ss03)",
"var(--sans-cpsp)",
"var(--sans-cv03)",
"var(--cv04)",
"var(--cv05)",
"var(--cv06)",
],
},
"font-mono": {
fontFamily: ["MDIO", "md-io-fallback", "monospace"],
fontVariationSettings: "var(--mono-ital)",
fontFeatureSettings: ["var(--mono-calt)", "var(--mono-ital)", "var(--mono-zero)"],
},
"font-heading": {
fontFamily: ["Obviously", "obviously-fallback", "system-ui", "sans-serif"],
fontVariationSettings: [
"var(--heading-wdth)",
"var(--heading-wght)",
"var(--heading-slnt)",
],
fontFeatureSettings: [
"var(--heading-salt)",
"var(--heading-ss06)",
"var(--heading-ss11)",
"var(--heading-cv09)",
"var(--heading-liga)",
"var(--heading-calt)",
],
},
});
}),
// adds a `s-*` utility to apply the same width and height
plugin(function sizePlugin(api) {
api.matchUtilities(
{ s: (value) => ({ width: value, height: value }) },
{ values: api.theme("width") },
);
}),
// adds `fluid-cols-*`, `fluid-cols-fit`, and `fluid-cols-fill` utilities
plugin(function fluidColumnsPlugin(api) {
api.matchUtilities(
{
"fluid-cols": (value) => ({
gridTemplateColumns: `repeat(var(--fluid-cols-repeat, auto-fill), minmax(${value}, 1fr))`,
}),
},
{ values: api.theme("width") },
);
api.addUtilities({
".fluid-cols-fit": { "--fluid-cols-repeat": "auto-fit" },
".fluid-cols-fill": { "--fluid-cols-repeat": "auto-fill" },
});
}),
plugin(function astroComponentsPlugin({ addComponents, theme }) {
addComponents({
"i, em": {
"@apply font-italic": {},
fontSynthesis: "none",
},
"b, strong": {
"@apply font-strong": {},
fontSynthesis: "none",
fontWeight: "700",
},
":focus-visible": {
"@apply outline-astro-pink-light outline-offset-2": {},
},
".container": {
"@apply w-full mx-auto max-w-screen-xl px-4 md:px-8": {},
},
".grid-container": {
display: "grid",
gridTemplateColumns:
"1fr min(var(--container-width, 1280px), calc(100% - (2 * var(--container-gutter-size, 24px)))) 1fr",
gridColumnGap: "var(--container-gutter-size, 24px)",
overflow: "clip",
width: "100%",
rowGap: theme("spacing.24"),
paddingBottom: theme("spacing.24"),
"@media screen(md)": {
rowGap: theme("spacing.32"),
paddingBottom: theme("spacing.32"),
},
"@media screen(lg)": {
rowGap: theme("spacing.40"),
paddingBottom: theme("spacing.40"),
},
/* center all children by default */
"& > *": {
gridColumn: "2",
},
/* allows content to bleed edge to edge */
"& > .bleed-full": {
gridColumn: "1 / -1",
},
/* allows content to bleed to starting edge */
"& > .bleed-start": {
gridColumn: "1 / 3",
},
/* allows content to bleed to ending edge */
"& > .bleed-end": {
gridColumn: "2 / -1",
},
"& > .bleed-none": {
gridColumn: "2 !important",
},
},
".accordion": {
"&::-webkit-details-marker": {
display: "none",
},
},
".heading-1": {
"@apply font-heading text-5xl leading-tight": {},
fontWeight: "var(--heading-weight-normal)",
},
".heading-2": {
"@apply font-heading text-4xl leading-tight": {},
fontWeight: "var(--heading-weight-normal)",
},
".heading-3": {
"@apply font-heading text-2xl leading-tight": {},
fontWeight: "var(--heading-weight-normal)",
},
".heading-4": {
"@apply font-heading text-xl leading-tight": {},
fontWeight: "var(--heading-weight-normal)",
},
".heading-5": {
"@apply font-heading text-lg leading-tight": {},
fontWeight: "var(--heading-weight-normal)",
},
".body": {
"@apply font-sans text-base": {},
"--sans-wght": "300",
fontWeight: "300",
"-webkit-font-smoothing": "subpixel-antialiased",
},
".body-large": {
"@apply font-sans text-lg leading-normal": {},
"--sans-wght": "200",
fontWeight: "200",
"-webkit-font-smoothing": "subpixel-antialiased",
},
".code": {
"@apply font-mono font-light": {},
},
".link": {
"@apply transition-colors font-light text-astro-gray-200 hover:text-white duration-300 ease-out":
{},
},
".link-underline": {
"@apply link border-b border-astro-gray-100 hover:border-astro-gray-300": {},
},
".input": {
"@apply rounded-lg border border-astro-gray-500 bg-astro-gray-600 p-3 leading-none shadow-inner":
{},
},
".input-textarea": {
"@apply py-2 leading-normal": {},
},
".landing-section": {
"@apply flex flex-col items-center justify-center overflow-visible text-center": {},
},
".bg-grid": {
backgroundSize: "100px 100px",
zIndex: theme("zIndex.grid"),
backgroundImage: `url("/assets/bg-grid.png")`,
backgroundPositionY: "-9px",
maskImage: "linear-gradient(to bottom, transparent, 10%, white, 90%, transparent)",
},
".panel": {
"@apply border border-astro-gray-500 bg-astro-gray-600 shadow-xl": {},
},
});
}),
plugin(function makeDBTypographyPlugin(api) {
api.addUtilities({
".db .heading": {
"@apply font-heading": {},
fontFeatureSettings: "'salt' on, 'ss06' on, 'ss11' on, 'cv09' on, 'liga' on, 'calt' on",
"font-variation-settings": `"wght" 475, "wdth" 490`,
},
});
}),
plugin(function maskGradientPlugin(api) {
api.addUtilities({
".mask-radial-gradient": {
maskImage: "radial-gradient(rgba(0, 0, 0, 0.8), transparent 60%)",
},
".mask-linear-gradient-to-b": {
maskImage: "linear-gradient(to bottom, white 0%, white 33%, transparent 90%)",
},
});
}),
],
} satisfies Config;