This repository has been archived by the owner on Jun 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtailwind.config.js
77 lines (74 loc) · 2.5 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
const plugin = require("tailwindcss/plugin");
const youTubePreset = require("./tailwind.preset.youtube");
const tiktokPreset = require("./tailwind.preset.tiktok");
// default config at: https://github.com/tailwindlabs/tailwindcss/blob/master/stubs/defaultConfig.stub.js
module.exports = {
content: ["./src/**/*.tsx", "./src/**/*.ts"],
darkMode: "class", // or 'media' or 'class'
theme: {
extend: {
fontFamily: {
sans: ["'Inter'", "sans-serif"],
heading: ["'Rubik'", "sans-serif"],
},
colors: {
transparent: "transparent",
current: "currentColor",
},
zIndex: {
60: "60",
},
},
},
presets: [youTubePreset, tiktokPreset],
plugins: [
// heading plugin
plugin(({ addComponents, config, theme }) => {
const headings = {
".hl-6xl": {
fontSize: theme("fontSize.6xl"),
fontFamily: theme("fontFamily.heading"),
lineHeight: config("theme.fontSize.6xl")[1].lineHeight,
fontWeight: theme("fontWeight.bold"),
},
".hl-5xl": {
fontSize: theme("fontSize.5xl"),
fontFamily: theme("fontFamily.heading"),
lineHeight: config("theme.fontSize.5xl")[1].lineHeight,
fontWeight: theme("fontWeight.bold"),
},
".hl-4xl": {
fontSize: theme("fontSize.4xl"),
fontFamily: theme("fontFamily.heading"),
lineHeight: config("theme.fontSize.4xl")[1].lineHeight,
fontWeight: theme("fontWeight.bold"),
},
".hl-3xl": {
fontSize: theme("fontSize.3xl"),
fontFamily: theme("fontFamily.heading"),
lineHeight: config("theme.fontSize.3xl")[1].lineHeight,
fontWeight: theme("fontWeight.bold"),
},
".hl-2xl": {
fontSize: theme("fontSize.2xl"),
fontFamily: theme("fontFamily.heading"),
lineHeight: config("theme.fontSize.2xl")[1].lineHeight,
fontWeight: theme("fontWeight.bold"),
},
".hl-xl": {
fontSize: theme("fontSize.xl"),
fontFamily: theme("fontFamily.heading"),
lineHeight: config("theme.fontSize.xl")[1].lineHeight,
fontWeight: theme("fontWeight.bold"),
},
".hl-lg": {
fontSize: theme("fontSize.lg"),
fontFamily: theme("fontFamily.heading"),
lineHeight: config("theme.fontSize.lg")[1].lineHeight,
fontWeight: theme("fontWeight.bold"),
},
};
addComponents(headings);
}),
],
};