-
Notifications
You must be signed in to change notification settings - Fork 203
/
tailwind.config.js
62 lines (61 loc) · 1.86 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
const colors = require("tailwindcss/colors");
const plugin = require("tailwindcss/plugin");
module.exports = {
mode: "jit",
purge: [
"./src/**/*.{js,jsx,ts,tsx}",
// Don't look in `content/` for now because this can generate unnecessary classes and also cause issues.
// For example, Prism adds `table` class to a token in TOML, and because some pages uses the word `table`,
// `.table` is generated, and that token gets `display: table`.
// "./content/**/*.mdx",
],
corePlugins: {
preflight: false,
},
// Using custom dark variant `html[data-theme="dark"]` to match Docusaurus.
darkMode: false,
theme: {
extend: {
colors: {
brand: "#b1361e",
amber: colors.amber,
fuchsia: colors.fuchsia,
pink: colors.pink,
// Admonitions colors
note: colors.coolGray[600],
"note-content": colors.coolGray[600],
"note-content-dark": colors.coolGray[400],
tip: colors.emerald[700],
"tip-content": colors.emerald[700],
"tip-content-dark": colors.emerald[500],
info: colors.sky[600],
"info-content": colors.sky[700],
"info-content-dark": colors.sky[500],
warning: colors.orange[600],
"warning-content": colors.orange[700],
"warning-content-dark": colors.orange[500],
caution: colors.red[500],
"caution-content": colors.red[700],
"caution-content-dark": colors.red[400],
},
},
},
variants: {
extend: {
backgroundColor: ["dark"],
textColor: ["dark"],
display: ["dark"],
},
},
plugins: [
plugin(({ addVariant, e }) => {
addVariant("dark", ({ modifySelectors, separator }) => {
modifySelectors(({ className }) => {
return `html[data-theme="dark"] .${e(
`dark${separator}${className}`
)}`;
});
});
}),
],
};