-
Notifications
You must be signed in to change notification settings - Fork 4
/
tailwind.config.cjs
71 lines (65 loc) · 1.72 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
const plugin = require("tailwindcss/plugin");
// https://gist.github.com/Merott/d2a19b32db07565e94f10d13d11a8574
const exportColorsAsCssVariables = plugin(({ addBase, theme }) => {
function extractColorVars(colorObj, colorGroup = "") {
return Object.keys(colorObj).reduce((vars, colorKey) => {
const value = colorObj[colorKey];
const newVars =
typeof value === "string"
? { [`--color${colorGroup}-${colorKey}`]: value }
: extractColorVars(value, `-${colorKey}`);
return { ...vars, ...newVars };
}, {});
}
addBase({
":root": extractColorVars(theme("colors")),
});
});
/** @type {import('tailwindcss').Config} */
const disabledCss = {
pre: false,
code: false,
"pre code": false,
"code::before": false,
"code::after": false,
"blockquote p:first-of-type::before": false,
"blockquote p:last-of-type::after": false,
};
module.exports = {
content: ["./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}"],
theme: {
extend: {
fontFamily: {
mono: ["Monaspace Argon", "monospace"],
},
colors: {
primary: {
600: "#e62755",
500: "#e83d66",
400: "#eb5277",
300: "#f07d99",
200: "#f5a9bb",
100: "#fad4dd",
50: "#fde9ee",
},
cheerp: "#56f4ec",
blurple: "#5865F2", // https://discord.com/branding
},
typography: (theme) => ({
stone: {
css: {
"--tw-prose-links": theme("colors.primary[500]"),
"--tw-prose-invert-links": theme("colors.primary[400]"),
},
},
DEFAULT: { css: disabledCss },
sm: { css: disabledCss },
lg: { css: disabledCss },
xl: { css: disabledCss },
"2xl": { css: disabledCss },
}),
},
},
plugins: [require("@tailwindcss/typography"), exportColorsAsCssVariables],
darkMode: "class",
};