forked from mastodon/joinmastodon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tailwind.config.js
130 lines (127 loc) · 3.21 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
const plugin = require("tailwindcss/plugin")
const defaultTheme = require("tailwindcss/defaultTheme")
function rem(px) {
return `${px / 16}rem`
}
/** @type {import('tailwindcss').Config} */
const config = {
content: [
"./pages/**/*.{js,ts,jsx,tsx}",
"./components/**/*.{js,ts,jsx,tsx}",
],
theme: {
fontSize: {
h1: rem(68),
h2: rem(50),
h3: rem(42),
h4: rem(38),
h5: rem(28),
h6: rem(22),
sh1: rem(22),
b1: rem(20),
b2: rem(16),
b3: rem(14),
b4: rem(12),
c2: rem(9),
c3: rem(6),
},
lineHeight: {
h1: "calc(75 / 68)",
h2: "calc(55 / 50)",
h3: "calc(55 / 42)",
h4: "calc(50 / 38)",
h5: "calc(38 / 28)",
h6: "calc(30 / 22)",
sh1: "calc(30 / 22)",
b1: "calc(30 / 20)",
b2: "calc(24 / 16)",
b3: "calc(17 / 14)",
b4: "calc(17 / 12)",
c2: "calc(19 / 9)",
c3: "calc(17 / 6)",
},
colors: {
black: "#000000",
gray: {
0: "#333333",
1: "#555555",
2: "#9b9b9b",
3: "#d4d4d4",
4: "#f3f3f3",
5: "#f6f6f6",
},
white: "#ffffff",
nightshade: {
50: "#fcefff",
100: "#BD8DC8",
300: "#834491",
600: "#4E155A",
900: "#1d0023", // "main"
},
eggplant: "#17063b",
blurple: {
300: "#858afa",
500: "#6364ff",
600: "#563acc", // "main"
900: "#2f0c7a",
},
lime: "#baff3b",
goldenrod: "#ffbe2e",
},
extend: {
fontFamily: {
sans: ["Manrope", "-apple-system", "BlinkMacSystemFont", "\"Segoe UI\"", "Roboto", "\"Helvetica Neue\"", "Arial", "\"Noto Sans\"", "sans-serif", "\"Apple Color Emoji\"", "\"Segoe UI Emoji\"", "\"Segoe UI Symbol\"", "\"Noto Color Emoji\""],
},
fontWeight: {
extranormal: 450,
},
letterSpacing: {
semiwide: ".01em",
},
backgroundImage: {
"blurple-gradient": `linear-gradient(0deg, #563acc 12.87%, #6364ff 88.62%)`,
},
gap: {
gutter: "var(--gutter-width)",
},
maxWidth: {
site: "90rem",
},
spacing: {
26: "6.5rem",
"footer-offset": "var(--footer-offset)",
},
dropShadow: {
/** Used for text on hero images that may shift around */
"safe-text": "0 0 30px #1d0023",
},
},
},
plugins: [
/** CSS Logical Properties https://github.com/stevecochrane/tailwindcss-logical */
require("tailwindcss-logical"),
plugin(function ({ addVariant }) {
/** A good default for hover states */
addVariant("hocus", ["&:hover", "&:focus-visible"])
/** Focus-visible inside of presentational containers */
addVariant("focus-visible-within", ["&:has(:focus-visible)"])
}),
],
}
module.exports = {
...config,
safelist: [
// needed for /guide
...Object.keys(config.theme.fontSize),
...Object.keys(config.theme.colors).reduce((arr, k) => {
if (typeof config.theme.colors[k] === "string") {
arr.push(`bg-${k}`)
return arr
} else {
return arr.concat(
Object.keys(config.theme.colors[k]).map((s) => `bg-${k}-${s}`)
)
}
}, []),
],
}