-
Notifications
You must be signed in to change notification settings - Fork 0
/
tailwind.config.js
66 lines (65 loc) · 2.13 KB
/
tailwind.config.js
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
import twForms from "@tailwindcss/forms";
import twDefaultTheme from "tailwindcss/defaultTheme";
import twPlugin from "tailwindcss/plugin";
import twConfig from "./tailwind.json";
/** @type {import('tailwindcss').Config} */
export default {
darkMode: ["selector", '[data-theme="dark"]'],
content: [
"./src/pages/**/*.astro",
"./src/layouts/**/*.astro",
"./src/components/**/*.astro",
],
future: "all",
experimental: { optimizeUniversalDefaults: true, matchVariant: true },
theme: {
screens: {
"3xs": "24em", // @media (min-width: 384px) { ... }
"2xs": "30em", // @media (min-width: 480px) { ... }
...twDefaultTheme.screens,
},
fluidCols: { fit: "fit", fill: "fill" },
extend: {
borderRadius: { pill: "100vmax" },
colors: twConfig.theme.colors,
fontFamily: {
sans: [
twConfig.theme.fontFamily.sans,
...twDefaultTheme.fontFamily.sans,
],
serif: [
twConfig.theme.fontFamily.serif,
...twDefaultTheme.fontFamily.serif,
],
mono: [
twConfig.theme.fontFamily.mono,
...twDefaultTheme.fontFamily.mono,
],
},
cursor: twConfig.theme.cursor,
screens: {
xs: "36em", // @media (min-width: 576px) { ... },
sm: "40em", // @media (min-width: 640px) { ... }
md: "48em", // @media (min-width: 768px) { ... }
lg: "64em", // @media (min-width: 1024px) { ... }
xl: "80em", // @media (min-width: 1280px) { ... }
"2xl": "96em", // @media (min-width: 1536px) { ... }
"3xl": "112.5em", // @media (min-width: 1800px) { ... }
},
animation: twConfig.theme.animation,
keyframes: twConfig.theme.keyframes,
},
},
plugins: [
twForms({ strategy: "base" }),
twPlugin(({ addVariant }) => {
addVariant("sans", '&:where([data-font="sans"], [data-font="sans"] *)');
addVariant("mono", '&:where([data-font="mono"], [data-font="mono"] *)');
addVariant(
"serif",
'&:where([data-font="serif"], [data-font="serif"] *)',
);
addVariant("hocus", ["&:hover", "&:focus"]);
}),
],
};