-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtailwind.config.cjs
117 lines (115 loc) · 3.42 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
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
const colors = require("tailwindcss/colors");
const defaultTheme = require("tailwindcss/defaultTheme");
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ["./src/**/*.{astro,md,mdx,ts,tsx}"],
darkMode: "class",
theme: {
extend: {
colors: {
purple: colors.violet,
},
fontFamily: {
sans: ["Inter Variable", "Inter", ...defaultTheme.fontFamily.sans],
},
// See tailwind default theme for theme keys
// https://github.com/tailwindlabs/tailwindcss/blob/master/stubs/defaultConfig.stub.js
typography: ({ theme }) => ({
DEFAULT: {
css: {
pre: {
margin: 0,
},
p: {
margin: 0,
paddingBottom: theme("spacing.5"),
},
"h1, h2, h3, h4, h5, h6": {
margin: 0,
},
"ul, ol, li": {
margin: 0,
},
"ul, ol": {
paddingBottom: theme("spacing.5"),
},
blockquote: {
fontWeight: theme("fontWeight.normal"),
fontStyle: "normal",
backgroundColor: theme("colors.purple.100"),
borderLeftColor: theme("colors.purple.400"),
borderLeftWidth: theme("borderWidth.8"),
marginTop: 0,
marginBottom: theme("spacing.4"),
marginInline: "-0.5rem",
paddingBlock: theme("spacing.4"),
paddingInline: theme("spacing.6"),
borderRadius: theme("borderRadius.md"),
quotes: "none",
"& > p": {
padding: 0,
margin: 0,
},
},
a: {
color: theme("colors.purple.600"),
textDecorationLine: "none",
"&:hover": {
textDecorationLine: "underline",
},
},
h1: {
fontSize: theme("fontSize.3xl")[0],
lineHeight: theme("fontSize.3xl")[1].lineHeight,
},
img: {
borderRadius: theme("borderRadius.md"),
margin: "0 auto",
},
"p, li": {
code: {
color: "inherit",
backgroundColor: theme("colors.zinc.200"),
padding: "0.25rem 0.5rem",
borderRadius: "0.375rem",
fontSize: "0.875rem",
lineHeight: "1.25rem",
fontWeight: "400",
},
},
".inline-code-block": {
code: {
backgroundColor: theme("colors.zinc.800"),
},
},
"code::before": {
content: '""',
},
"code::after": {
content: '""',
},
},
},
// Dark Mode specific styles
invert: {
css: {
blockquote: {
backgroundColor: "rgba(121,72,232,0.2)",
borderLeftColor: theme("colors.purple.800"),
},
a: {
color: theme("colors.purple.400"),
border: theme("colors.purple.800"),
},
"p, li": {
code: {
backgroundColor: theme("colors.zinc.800"),
},
},
},
},
}),
},
},
plugins: [require("@tailwindcss/typography")],
};