-
Notifications
You must be signed in to change notification settings - Fork 1
/
tailwind.config.ts
102 lines (102 loc) · 3.32 KB
/
tailwind.config.ts
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
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./app/**/*.{js,ts,jsx,tsx}", // Adjust according to your project structure
"./pages/**/*.{js,ts,jsx,tsx}",
"./components/**/*.{js,ts,jsx,tsx}",
],
darkMode: "class", // Enable dark mode based on the 'class' strategy
theme: {
extend: {
colors: {
black: "#121212",
light: "#f5f5f5",
dark: "#181818",
primary: {
light: "#1a73e8",
dark: "#8ab4f8",
},
text: {
light: "#333",
dark: "#e5e5e5",
},
codeBg: {
light: "#f0f0f0", // Light mode background for code
dark: "#1e1e1e", // Dark mode background for code
},
},
typography: (theme: any) => ({
DEFAULT: {
css: {
color: theme("colors.text.light"), // Default text color
a: {
color: theme("colors.primary.light"),
"&:hover": {
color: theme("colors.primary.dark"),
},
},
h1: { color: theme("colors.text.light") },
h2: { color: theme("colors.text.light") },
h3: { color: theme("colors.text.light") },
blockquote: {
color: theme("colors.text.light"),
borderLeftColor: theme("colors.primary.light"),
},
code: {
color: theme("colors.primary.light"),
backgroundColor: theme("colors.codeBg.light"),
padding: "2px 4px",
borderRadius: "4px",
},
"code::before": false,
"code::after": false,
pre: {
backgroundColor: theme("colors.codeBg.light"),
color: theme("colors.text.light"),
borderRadius: "8px",
padding: "1rem",
overflowX: "auto", // Horizontal scroll if content is too long
},
},
},
dark: {
css: {
color: theme("colors.text.dark"), // Dark mode text color
a: {
color: theme("colors.primary.dark"),
"&:hover": {
color: theme("colors.primary.light"),
},
},
h1: { color: theme("colors.text.dark") },
h2: { color: theme("colors.text.dark") },
h3: { color: theme("colors.text.dark") },
h4: { color: theme("colors.text.dark") },
strong: { color: theme("colors.text.dark") },
blockquote: {
color: theme("colors.text.dark"),
borderLeftColor: theme("colors.primary.dark"),
},
code: {
color: theme("colors.primary.dark"),
backgroundColor: theme("colors.codeBg.dark"),
padding: "2px 4px",
borderRadius: "4px",
overflowX: "auto",
},
"code::before": false,
"code::after": false,
pre: {
backgroundColor: theme("colors.codeBg.dark"),
color: theme("colors.text.dark"),
borderRadius: "8px",
padding: "1rem",
overflowX: "auto",
},
},
},
}),
},
},
plugins: [require("@tailwindcss/typography")], // Use typography plugin for styling blog content
};