-
Notifications
You must be signed in to change notification settings - Fork 29
/
tailwind.config.js
158 lines (147 loc) · 3.79 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
149
150
151
152
153
154
155
156
157
158
// eslint-disable-next-line
const colors = require("tailwindcss/colors")
const generateColorShades = (name) =>
[50, ...Array.from({ length: 9 }).map((_, i) => (i + 1) * 100), 950].reduce(
(acc, k) => ({
...acc,
[k]: `var(--${name}-${k})`,
}),
{}
)
const customColors = {
foreground: `var(--foreground)`,
background: `var(--background)`,
secondaryBg: `var(--secondaryBg)`,
gray: generateColorShades("gray"),
pink: generateColorShades("pink"),
blue: generateColorShades("blue"),
yellow: generateColorShades("yellow"),
green: generateColorShades("green"),
red: generateColorShades("red"),
}
const fontStack = [
"Inter",
"-apple-system",
"BlinkMacSystemFont",
"Segoe UI",
"Roboto",
"Oxygen-Sans",
"Ubuntu",
"Cantarell",
"Helvetica Neue",
"sans-serif",
"Apple Color Emoji",
"Segoe UI Emoji",
"Segoe UI Symbol",
].join(",")
const monoStack = [
"ui-monospace",
"SFMono-Regular",
"SF Mono",
"Consolas",
"Liberation Mono",
"Menlo",
"monospace",
].join(",")
module.exports = {
content: [
"./pages/**/*.{js,ts,jsx,tsx}",
"./components/**/*.{js,ts,jsx,tsx}",
"./layouts/**/*.{js,ts,jsx,tsx}",
],
darkMode: "class", // 'media' or 'class'
theme: {
fontFamily: {
sans: fontStack,
mono: monoStack,
},
extend: {
colors: {
transparent: "transparent",
current: "currentColor",
black: colors.black,
white: colors.white,
...customColors,
},
backgroundImage: {
post: "linear-gradient(290.44deg, rgb(182 206 235 / 6%) 27.03%, rgba(204, 219, 235, 0.420833) 59.53%, rgb(215 185 238 / 30%) 86.77%)",
bottomCta:
"radial-gradient(80.92% 283.41% at 34.4% -121.22%, #269ACC 0%, #461B9F 46.86%, #830757 100%)",
},
fontSize: {
// Headings
huge: ["clamp(48px, 6vw, 64px)", "1.25"],
jumbo: ["clamp(40px, 5vw, 48px)", "1.25"],
large: ["clamp(32px, 4vw, 40px)", "1.25"],
h1: ["clamp(28px, 2.5vw, 32px)", "1.375"],
h2: ["clamp(24px, 3vw, 28px)", "1.375"],
h3: ["clamp(22px, 2.5vw, 24px)", "1.375"],
h4: ["20px", "1.375"],
h5: ["18px", "1.5"],
h6: ["16px", "1.5"],
// Paragraphs
xl: ["20px", "1.5"],
lg: ["18px", "1.5"],
base: ["16px", "1.5"],
sm: ["14px", "21px"],
xs: ["12px", "18px"],
},
typography: (theme) => ({
DEFAULT: {
css: {
color: theme("colors.foreground"),
a: {
color: theme("colors.foreground"),
textDecoration: "none",
"&:hover": {
color: theme("colors.primary"),
},
},
"a code": {
color: theme("colors.white"),
},
p: {
color: theme("colors.gray.800"),
a: {
textDecoration: "underline",
},
},
li: {
a: {
textDecoration: "underline",
},
},
h1: {
color: theme("colors.pink.50"),
},
h2: {
color: theme("colors.foreground"),
},
h3: {
color: theme("colors.foreground"),
},
h4: {
color: theme("colors.foreground"),
},
img: {
borderRadius: "10px",
},
code: {
background: theme("colors.gray.800"),
color: theme("colors.gray.200"),
padding: "2px",
borderRadius: "2px",
},
},
},
}),
},
},
variants: {
extend: {},
},
plugins: [
require("@tailwindcss/typography"),
require("@tailwindcss/line-clamp"),
],
}