This repository has been archived by the owner on Feb 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 64
/
tailwind.config.js
245 lines (236 loc) · 5.55 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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
const defaultTheme = require("tailwindcss/defaultTheme")
const plugin = require("tailwindcss/plugin")
const { SCREENS } = require("./src/constants/screens")
const { Z_INDICES } = require("./src/constants/z-indices")
module.exports = {
content: [
"src/**/*.{vue,js,jsx,ts,tsx,mdx}",
"./nuxt.config.js",
"./tailwind.safelist.txt",
],
theme: {
screens: SCREENS,
zIndex: Z_INDICES,
colors: {
// Accents
tomato: "#e23600",
gold: "#efbe00",
"forest-green": "#008300",
"dark-turquoise": "#05b5da",
"dark-slate-blue": "#3c5c99",
"trans-blue": "#3e58e1",
"trans-blue-action": "#5067e4",
"dark-blue": "#23282d",
// Brand
yellow: "#ffe033",
pink: "#c52b9b",
// Active
"dark-pink": "#7c2264",
// Grayscale
black: "#000000",
"dark-gray": "#767676", // rgb(118, 118, 188)
gray: "#b0b0b0", // rgb(176, 176, 176)
"light-gray": "#d8d8d8", // rgb(216, 216, 216)
white: "white",
// WordPress
"admin-gray": "#dcdcde",
// Dark Charcoal
"dark-charcoal": {
DEFAULT: "#30272e",
"06": "#f3f2f2", // rgb(243, 242, 242)
10: "#eae9ea", // rgb(234, 233, 234)
20: "#d6d4d5",
30: "#c1bec0",
40: "#aca9ab",
50: "#989397",
60: "#837d82",
70: "#6e686d",
80: "#595258",
90: "#453D43",
},
// Special keywords
tx: "transparent",
curr: "currentColor",
current: "currentColor",
},
spacing: {
// Constants
"0.5px": "0.5px",
px: "1px",
"1.5px": "1.5px",
ch: "1ch",
ex: "1ex",
half: "50%",
full: "100%",
// Indexed by multiples of baseline (~ `0.25rem`)
0: "0",
0.5: "0.125rem",
1: "0.25rem",
2: "0.50rem",
3: "0.75rem",
4: "1.00rem",
5: "1.25rem",
6: "1.50rem",
7: "1.75rem",
8: "2.00rem",
10: "2.50rem",
12: "3.00rem",
14: "3.50rem",
15: "3.75rem",
16: "4.00rem",
20: "5.00rem",
24: "6.00rem",
26: "6.50rem",
30: "7.50rem",
40: "10.00rem",
50: "12.50rem",
64: "16.00rem",
66: "16.25rem",
70: "17.50rem",
80: "20.00rem",
120: "30.00rem",
},
ringWidth: {
DEFAULT: "1.5px", // aka slim
bold: "3.0px",
0: 0,
},
borderWidth: {
0: "0px",
DEFAULT: "1px",
1.5: "1.5px",
2: "2px",
3: "3px",
},
ringOffsetWidth: {
0: "0px",
1: "1px",
2: "2px",
},
fontSize: {
// Deprecated
lg: "1.12rem",
lgr: "1.43rem",
"7xl": [
// Heading 1
"5.625rem", // 90px
"1.3", // 130%
],
"6xl": [
// Heading 2
"2.0000rem", // 32px
"1.3", // 130%
],
"5xl": [
// Heading 3
"1.7500rem", // 28px
"1.3", // 130%
],
"4xl": [
// Heading 4
"1.5000rem", // 24px
"1.3", // 130%
],
"3xl": [
// Heading 5
"1.1875rem", // 19px
"1.3", // 130%
],
"2xl": [
// Heading 6
"1.0000rem", // 16px
"1.3", // 130%
],
// Content
base: [
"0.8750rem", // 14px
"1.5", // 150%
],
sm: [
// small, eg. label
"0.8125rem", // 13px
"1.3", // 130%
],
sr: [
// smaller, eg. caption, category
"0.7500rem", // 12px
"1.3", // 130%
],
xs: [
// extra small, eg. time
"0.6875rem", // 11px
"1.2", // 120%
],
},
// FIXME: This should be `lineHeight` but fixing it will break VRT
lineHeights: {
larger: "1.9",
large: "1.7",
normal: "1.5",
snug: "1.3",
tight: "1.2",
none: "1.0",
},
flexGrow: {
0: 0,
DEFAULT: 1,
2: 2,
},
fontFamily: {
mono: ['"JetBrains Mono"', "monospace"],
sans: ["Inter", ...defaultTheme.fontFamily.sans],
serif: [...defaultTheme.fontFamily.serif],
},
extend: {
lineHeight: {
relaxed: "1.8",
},
scale: {
"-100": "-1",
},
boxShadow: {
ring: "inset 0 0 0 1px white",
"ring-1.5": "inset 0 0 0 1.5px white",
"el-2": "0 0.125rem 0.25rem rgba(0, 0, 0, 0.1)",
"slim-filled": "inset 0 0 0 1.5px white",
"bold-filled": "inset 0 0 0 3px white",
},
borderRadius: {
inherit: "inherit",
},
typography: (theme) => ({
DEFAULT: {
css: {
"--tw-prose-body": theme("colors.dark-charcoal"),
"--tw-prose-headings": theme("colors.dark-charcoal"),
"--tw-prose-links": theme("colors.pink"),
a: {
textDecoration: "none",
"&:hover": {
"text-decoration": "underline",
},
},
},
},
}),
},
},
plugins: [
require("tailwindcss-rtl"),
require("@tailwindcss/line-clamp"),
require("@tailwindcss/typography"),
require("tailwindcss-labeled-groups")(["waveform"]),
// Focus styles
// This plugin has related stylesheets in `src/styles/tailwind.css`.
plugin(({ matchUtilities, theme }) => {
matchUtilities(
Object.fromEntries(
["focus-slim-tx", "focus-slim-filled", "focus-bold-filled"].map(
(item) => [item, (value) => ({ "--tw-ring-color": value })]
)
),
{ values: { ...theme("colors"), DEFAULT: theme("colors.pink") } }
)
}),
],
}