-
Notifications
You must be signed in to change notification settings - Fork 57
/
tailwind.config.ts
72 lines (68 loc) · 1.44 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
import { type Config } from "npm:[email protected]";
const TAG_PURPLE = "#7B61FF";
const TAG_CYAN = "#0CAFC6";
const extraColors = {
"Function": "#056CF0",
"Method": "#056CF0",
"Variable": "#7E57C0",
"Property": "#7E57C0",
"Class": "#20B44B",
"Enum": "#22ABB0",
"Interface": "#D2A064",
"TypeAlias": "#A4478C",
"Namespace": "#D25646",
"new": TAG_PURPLE,
"abstract": TAG_CYAN,
"deprecated": "#DC2626", // red 600
"unstable": TAG_PURPLE,
"writeonly": TAG_PURPLE,
"readonly": TAG_PURPLE,
"protected": TAG_PURPLE,
"private": TAG_CYAN,
"optional": TAG_CYAN,
"permissions": TAG_CYAN,
"other": "#57534E", // stone 600
};
export default {
content: [
"./src/html/**/*.rs",
"./src/html/templates/*.hbs",
],
safelist: [
{
pattern: new RegExp(`^text-(${Object.keys(extraColors).join("|")})$`),
},
{
pattern: new RegExp(
`^border-(${Object.keys(extraColors).join("|")})\/50$`,
),
},
{
pattern: new RegExp(
`^bg-(${Object.keys(extraColors).join("|")})\/(?:5|15)$`,
),
variants: ["hover"],
},
],
theme: {
extend: {
colors: {
...extraColors,
"contextLink": "#0E6590",
gray: {
1: "#868789",
},
},
borderWidth: {
"1.5": "1.5px",
},
margin: {
"indent": "2ch",
},
maxWidth: {
"prose": "75ch",
},
},
},
darkMode: "class",
} as Config;