-
Notifications
You must be signed in to change notification settings - Fork 0
/
tailwind.config.mjs
95 lines (92 loc) · 2.78 KB
/
tailwind.config.mjs
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
import typographyPlugin from "@tailwindcss/typography";
import defaultTheme from "tailwindcss/defaultTheme.js";
function withOpacityValue(variable) {
return ({ opacityValue }) => {
if (opacityValue === undefined) {
return `hsl(var(${variable}))`;
}
return `hsl(var(${variable}) / ${opacityValue})`;
};
}
export default {
jit: true,
darkMode: "class",
content: ["./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}"],
theme: {
extend: {
colors: {
bgColor: withOpacityValue("--theme-bg"),
textColor: withOpacityValue("--theme-text"),
accent: withOpacityValue("--theme-accent"),
accent2: withOpacityValue("--theme-accent2"),
quoteColor: withOpacityValue("--theme-quote"),
codeBG: withOpacityValue("--theme-code-bg"),
},
fontFamily: {
sans: ["Iosevka Aile Iaso", ...defaultTheme.fontFamily.sans],
mono: ["Iosevka Curly Iaso", ...defaultTheme.fontFamily.mono],
},
typography: ({ theme }) => ({
capucho: {
css: {
"--tw-prose-body": theme("colors.textColor"),
"--tw-prose-headings": theme("colors.accent2"),
"--tw-prose-links": theme("colors.textColor"),
"--tw-prose-bold": theme("colors.textColor"),
"--tw-prose-bullets": theme("colors.textColor"),
"--tw-prose-quotes": theme("colors.quoteColor"),
"--tw-prose-code": theme("colors.textColor"),
"--tw-prose-hr": theme("colors.textColor"),
"--tw-prose-th-borders": theme("colors.textColor"),
},
},
DEFAULT: {
css: {
a: {
"@apply no-underline": "",
},
strong: {
fontWeight: "700",
},
code: {
color: theme("colors.textColor"),
backgroundColor: theme("colors.codeBG"),
},
"code::before": {
content: "none",
},
"code::after": {
content: "none",
},
blockquote: {
borderLeftWidth: "none",
},
"blockquote::before": {
content: "none",
},
"blockquote::after": {
content: "none",
},
hr: {
borderTopStyle: "dashed",
},
thead: {
borderBottomWidth: "none",
},
"thead th": {
fontWeight: "700",
borderBottom: "1px dashed #666",
},
"tbody tr": {
borderBottomWidth: "none",
},
tfoot: {
borderTop: "1px dashed #666",
},
},
},
}),
},
},
plugins: [typographyPlugin],
};