-
Notifications
You must be signed in to change notification settings - Fork 15
/
tailwind.config.js
121 lines (118 loc) · 3.17 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
const defaultTheme = require("tailwindcss/defaultTheme");
const typography = require("@tailwindcss/typography");
const colors = require("tailwindcss/colors");
//const colorBrand = 'var(--color-pretty)';
// Utils
const round = (num) =>
num
.toFixed(7)
.replace(/(\.[0-9]+?)0+$/, "$1")
.replace(/\.0$/, "");
const rem = (px) => `${round(px / 16)}rem`;
const em = (px, base) => `${round(px / base)}em`;
module.exports = {
// important: true, // See https://tailwindcss.com/docs/configuration#important
content: ["./**/hugo_stats.json"],
darkMode: "class",
theme: {
colors: {
transparent: colors.transparent,
current: colors.current,
primary: colors.blue,
secondary: colors.cyan,
neutral: colors.zinc,
yellow: colors.yellow,
gray: colors.gray,
pink: colors.pink,
red: colors.red,
},
extend: {
fontFamily: {
sans: [
"ui-sans-serif",
"-apple-system",
"BlinkMacSystemFont",
'"Apple Color Emoji"',
'"Segoe UI Emoji"',
'"Segoe UI Symbol"',
'"Segoe UI"',
'"PingFang SC"',
'"Hiragino Sans GB"',
'"Source Han Sans CN"',
'"Microsoft YaHei"',
'"Helvetica Neue"',
"Helvetica",
"Arial",
"sans-serif",
],
serif: [
"ui-serif",
"Lora",
'"Source Han Serif CN"',
"NSimSun",
"Georgia",
'"Times New Roman"',
"Times",
'"Songti SC"',
'"Apple Color Emoji"',
'"Segoe UI Emoji"',
"serif",
],
mono: ["ui-monospace", "SFMono-Regular", "Consolas", "Liberation Mono", "Menlo", "Courier", "monospace"],
},
// boxShadow: {
// dark: "0 1px 3px 0 rgba(255, 255, 255, 0.1), 0 1px 2px 0 rgba(255, 255, 255, 0.06)",
// },
lineHeight: {
11: "2.75rem",
12: "3rem",
},
maxWidth: {
xxs: "12rem",
},
typography: ({ theme }) => ({
DEFAULT: {
css: {
a: {
color: theme("colors.primary.600"),
"&:hover": {
color: theme("colors.primary.500"),
},
},
"figure > *": {
marginLeft: "auto",
marginRight: "auto",
},
figcaption: {
textAlign: "center",
},
mark: {
color: "var(--tw-prose-body)",
backgroundColor: theme("colors.yellow.200"),
},
"li > input:first-child": {
marginTop: "auto",
marginBottom: "auto",
marginRight: rem(4),
},
"li:has(input:first-child)": {
paddingLeft: "0",
},
"li:has(input:first-child)::marker": {
color: theme("colors.transparent"),
},
},
},
invert: {
css: {
mark: {
color: "var(--tw-prose-body)",
backgroundColor: theme("colors.yellow.800"),
},
},
},
}),
},
},
plugins: [typography],
};