-
Notifications
You must be signed in to change notification settings - Fork 0
/
tailwind.config.cjs
97 lines (97 loc) · 2.39 KB
/
tailwind.config.cjs
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
const config = require("./tailwind.theme.config.cjs")
/**
* Find the applicable theme color palette, or use the default one
*/
const themeConfig =
process.env.THEME_KEY && config[process.env.THEME_KEY] ? config[process.env.THEME_KEY] : config.default
const { colors } = themeConfig
module.exports = {
darkMode: "class",
content: ["./public/**/*.html", "./src/**/*.{astro,js,ts,mdx}"],
safelist: ["dark"],
theme: {
extend: {
colors: {
theme: {
...colors
}
},
typography: (theme) => ({
dark: {
css: {
color: theme("colors.gray.200"),
a: {
color: colors.dark.primary,
"&:hover": {
color: colors.dark.secondary
}
},
blockquote: {
color: colors.dark.primary,
borderColor: colors.primary
},
"blockquote > p::before, p::after": {
color: colors.primary
},
strong: {
color: colors.dark.primary
},
h1: {
color: colors.dark.secondary
},
h2: {
color: colors.dark.secondary
},
h3: {
color: colors.dark.secondary
},
h4: {
color: colors.dark.secondary
}
}
},
DEFAULT: {
css: {
a: {
color: colors.secondary,
"&:hover": {
color: colors.primary
}
},
blockquote: {
color: colors.secondary,
borderColor: colors.dark.primary
},
"blockquote > p::before, p::after": {
color: colors.dark.primary
},
strong: {
color: colors.primary
},
h1: {
color: colors.primary
},
h2: {
color: colors.primary
},
h3: {
color: colors.primary
},
h4: {
color: colors.primary
}
}
}
})
}
},
variants: {
extend: { typography: ["dark"] }
},
plugins: [
require("@tailwindcss/typography"),
require("@tailwindcss/forms"),
require("@tailwindcss/aspect-ratio"),
require("tailwindcss-hyphens")
]
}