-
Notifications
You must be signed in to change notification settings - Fork 0
/
tailwind.config.js
102 lines (101 loc) · 2.98 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
const defaultTheme = require("tailwindcss/defaultTheme")
const colors = require("tailwindcss/colors")
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./pages/**/*.{js,ts,jsx,tsx}",
"./ui/**/*.{js,ts,jsx,tsx}",
"./lib/**/*.{js,ts}",
"./content/posts/**/*.mdx",
],
darkMode: "class",
theme: {
extend: {
screens: {
xs: "420px",
},
fontFamily: {
sans: ["var(--font-inter)", ...defaultTheme.fontFamily.sans],
hubot: ["var(--font-hubot)", ...defaultTheme.fontFamily.sans],
},
colors: {
gray: colors.stone,
},
keyframes: ({ theme }) => ({
mutation: {
"0%": {
background: theme("colors.rose.200 / 3%"),
},
"10%": {
background: theme("colors.rose.200 / 15%"),
color: theme("colors.rose.200 / 75%"),
},
"100%": {
background: theme("colors.rose.200 / 0%"),
},
},
emoji: {
"0%": {
opacity: "0",
transform: "translateY(0) scale(0)",
},
"50%": {
opacity: "1",
transform: "translateY(-40px) scale(1)",
},
to: {
opacity: "0",
transform: "translateY(-60px) scale(1.4)",
},
},
loading: {
"0%": {
opacity: ".2",
},
"20%": {
opacity: "1",
transform: "translateX(1px)",
},
to: {
opacity: ".2",
},
},
shimmer: {
"100%": {
transform: "translateX(100%)",
},
},
}),
boxShadow: ({ theme }) => ({
// inspired by https://www.joshwcomeau.com/shadow-palette/
"surface-glass": `
inset 0.25px 1px 0 0 ${theme("colors.rose.200 / 3%")},
0px 0.3px 0.3px rgba(3, 2, 2, 0.02),
0px 2.2px 2.5px -0.4px rgba(3, 2, 2, 0.02),
0px 4.3px 4.8px -0.8px rgba(3, 2, 2, 0.02),
0px 7.5px 8.4px -1.2px rgba(3, 2, 2, 0.02),
0px 12.8px 14.4px -1.7px rgba(3, 2, 2, 0.02),
0px 21px 23.6px -2.1px rgba(3, 2, 2, 0.02),
0px 33.2px 37.4px -2.5px rgba(3, 2, 2, 0.02)`,
"surface-elevation-low": `
inset 0.25px 1px 1px 0 ${theme("colors.rose.200 / 1.5%")},
0.3px 0.5px 0.7px rgba(3, 2, 2, 0.2),
0.4px 0.8px 1px -1.2px rgba(3, 2, 2, 0.2),
1px 2px 2.5px -2.5px rgba(3, 2, 2, 0.2);`,
"surface-elevation-medium": `
inset 0.25px 1px 1px 0 ${theme("colors.rose.200 / 3%")},
0.3px 0.5px 0.7px rgba(3, 2, 2, 0.1),
0.8px 1.6px 2px -0.8px rgba(3, 2, 2, 0.1),
2.1px 4.1px 5.2px -1.7px rgba(3, 2, 2, 0.1),
5px 10px 12.6px -2.5px rgba(3, 2, 2, 0.1)`,
}),
},
backgroundSize: {
"50%": "50%",
},
},
variants: {
extend: {},
},
plugins: [require("@tailwindcss/line-clamp"), require("@tailwindcss/forms")],
}