-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtailwind.config.js
158 lines (156 loc) · 4.36 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
const plugin = require(`tailwindcss/plugin`);
const openSans = '"Open Sans", sans-serif';
const serif = '"Merriweather", serif';
/** @type {import("@types/tailwindcss/tailwind-config").TailwindConfig } */
module.exports = {
content: [
"./src/pages/**/*.{tsx,ts}",
"./src/components/**/*.{ts,tsx}",
"node_modules/dragontail-experimental/dist/cjs/index.js",
],
safelist: ["flex-col", "flex-row", "flex-col-reverse", "flex-row-reverse"],
mode: "jit",
theme: {
fontFamily: {
sans: openSans,
serif: serif,
mono: ["ui-monospace", "Monaco"],
},
extend: {
colors: {
"timeline-terracotta": "#e2725b",
"timeline-green": "#36827f",
"timeline-blue": "#464d77",
"timeline-brown": "#5b4b49",
"timeline-bronze": "#c5832b",
"timeline-forest": "#014421",
"timeline-darkblue": "#222e50",
"timeline-tangerine": "#f28500",
},
fontSize: {
paragraph: "1.1rem",
},
keyframes: (theme) => ({
enlarge: {
from: {
"transform-origin": "center",
transform: "scale(0.3)",
opacity: 0.3,
},
to: {
"transform-origin": "center",
transform: "scale(1)",
opacity: 1,
},
},
loadingGrow: {
from: {
left: 0,
width: 0,
},
to: {
left: 0,
width: "100%",
},
},
wiggle: {
"0%, 100%": { transform: "rotate(-3deg)", opacity: 0.9 },
"50%": { transform: "rotate(3deg)", opacity: 1 },
},
fadeIn: {
from: {
opacity: 0,
},
to: {
opacity: 1,
},
},
fadeInLeft: {
"0%": {
opacity: 0,
transform: "translateX(-100vw)",
},
"100%": {
opacity: 1,
transform: "translateX(0)",
},
},
fadeInRight: {
"0%": {
opacity: 0,
transform: "translateX(100vw)",
},
"100%": {
opacity: 1,
transform: "translateX(0)",
},
},
fadeInUp: {
"0%": {
opacity: 0,
transform: "translateY(300px)",
},
"100%": {
opacity: 1,
transform: "translateY(0)",
},
},
}),
animation: {
"spin-slow": "spin 3s linear infinite",
"fade-in-left": "fadeInLeft 1000ms ease-in-out forwards",
"fade-in-left-slow": "fadeInLeft 1300ms ease-in-out forwards",
"fade-in-right": "fadeInRight 1000ms ease-in-out forwards",
"fade-in-right-slow": "fadeInRight 1300ms ease-in-out forwards",
"fade-in-up": "fadeInUp 1000ms ease-in-out forwards",
"fade-in-up-slow": "fadeInUp 1300ms ease-in-out forwards",
wiggle: "wiggle 1.4s ease-in-out infinite",
"fade-in": "fadeIn 1s ease-in-out forwards",
"fade-in-slow": "fadeIn 1.3s ease-in-out forwards",
enlarge: "enlarge 0.7s ease-out forwards",
"enlarge-slow": "enlarge 1s ease-out forwards",
"loading-grow": "loadingGrow 2s cubic-bezier(1,.11,0,.89) forwards",
appear: "appear 200ms ease-out forwards",
},
screens: {
md2: "868px",
xs: "428px",
xxs: "368px",
landscape: "100vh",
},
minWidth: {
350: "350px",
},
scale: {
102: "1.02",
103: "1.03",
},
},
},
variants: {
extend: {
boxShadow: ["hover"],
},
},
plugins: [
plugin(({ addVariant }) => {
addVariant("child-images", "& img");
addVariant(
"child-headings",
[1, 2, 3, 4, 5, 6].map((each) => `& h${each}`)
);
addVariant("child-paragraphs", "& p");
addVariant("child-table-cells", ["& table td", "& table th"]);
addVariant("child-table", "& table");
addVariant("child-list", ["& ol", "& ul"]);
addVariant("child-ol", "& ol");
addVariant("child-ul", "& ul");
addVariant("child-links", "& a");
addVariant("child-math", "& .math");
addVariant("child-links-hover", "& a:hover");
addVariant("child-code", "& pre");
addVariant("child-block-quote", "& blockquote");
addVariant("child-iframes", "& iframe");
}),
],
};