This repository has been archived by the owner on Mar 19, 2024. It is now read-only.
forked from canstand/compost
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtailwind.config.js
148 lines (145 loc) · 3.93 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
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: "var(--tw-prose-links)",
"&:hover": {
color: "var(--tw-prose-links)",
},
},
dd: {
marginLeft: em(28, 16),
},
dt: {
fontWeight: "600",
},
"figure > *": {
marginLeft: "auto",
marginRight: "auto",
},
figcaption: {
textAlign: "center",
},
mark: {
color: "var(--tw-prose-body)",
backgroundColor: theme("colors.yellow.200"),
},
kbd: {
fontSize: rem(14),
backgroundColor: theme("colors.neutral.200"),
borderRadius: rem(3),
border: "solid 1px " + theme("colors.neutral.500"),
borderBottomWidth: "2px",
padding: "1px 3px",
},
code: {
color: 'var(--tw-prose-code)',
fontWeight: '600',
},
'code::before': {
content: '',
},
'code::after': {
content: '',
},
"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"),
},
kbd: {
backgroundColor: theme("colors.neutral.700"),
},
},
},
}),
},
},
plugins: [typography],
};