-
Notifications
You must be signed in to change notification settings - Fork 0
/
tailwind.config.js
106 lines (84 loc) · 2.53 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
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
98
99
100
101
102
103
104
105
106
/** @type {import('tailwindcss').Config} */
function withOpacityValue(variable) {
return ({ opacityValue }) => {
if (opacityValue === undefined) {
return `rgb(var(${variable}))`;
}
return `rgb(var(${variable}) / ${opacityValue})`;
};
}
let themeColors = {
base: withOpacityValue("--color-base"),
surface: withOpacityValue("--color-surface"),
text: withOpacityValue("--color-text"),
pine: withOpacityValue("--color-pine"),
iris: withOpacityValue("--color-iris"),
highlightLow: withOpacityValue("--color-highlight-low"),
highlightHigh: withOpacityValue("--color-highlight-high"),
love: withOpacityValue("--color-love"),
overlay: withOpacityValue("--color-overlay"),
};
module.exports = {
content: [
"./src/**/*.{js,ts,jsx,tsx}",
"./data/**/*.mdx",
],
theme: {
extend: {
colors: themeColors,
typography: (theme) => ({
DEFAULT: {
css: {
"--tw-prose-body": theme("colors.text"),
"--tw-prose-headings": theme("colors.pine"),
"--tw-prose-links": theme("colors.highlightLow"),
"--tw-prose-pre-bg": theme("colors.overlay"),
"--tw-prose-code": theme("colors.love"),
"--tw-prose-pre-code": theme("colors.text"),
'--tw-prose-bold': theme('colors.love'),
},
code: {
color: theme("colors.iris"),
background: "rgb(38 35 58)",
padding: "0.25rem 0.4rem",
borderRadius: "0.25rem",
fontWeight: "600",
},
"code::before": {
content: "",
},
"code::after": {
content: "",
},
},
xl: {
css: {
"--tw-prose-body": theme("colors.text"),
"--tw-prose-headings": theme("colors.pine"),
"--tw-prose-links": theme("colors.highlightLow"),
"--tw-prose-pre-bg": theme("colors.overlay"),
"--tw-prose-code": theme("colors.love"),
"--tw-prose-pre-code": theme("colors.text"),
'--tw-prose-bold': theme('colors.love'),
},
code: {
color: theme("colors.iris"),
background: "rgb(38 35 58)",
padding: "0.25rem 0.4rem",
borderRadius: "0.25rem",
fontWeight: "600",
},
"code::before": {
content: "",
},
"code::after": {
content: "",
},
}
})
},
},
plugins: [
require('@tailwindcss/typography'),
],
}