-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtailwind.config.js
84 lines (80 loc) · 2.19 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
/** @type {import('tailwindcss').Config} */
import formsPlugin from "@tailwindcss/forms"
import colors from "tailwindcss/colors"
import plugin from "tailwindcss/plugin"
const neutral = colors.slate
export default {
content: ["./src/**/*.{html,js,jsx,ts,tsx}", "./index.html"],
darkMode: "selector",
theme: {
extend: {
colors: {
accentColor: "#2f87a5",
brandColor: "#0b2d7c",
fadedTextColor: neutral[400],
textColor: neutral[900],
},
fontFamily: {
body: ["Inter, sans-seirf"],
code: ["'Source Code Pro', monospace"],
display: ["Glegoo, serif"],
},
},
},
plugins: [
plugin(function ({ addBase, theme }) {
addBase({
"*": {
scrollbarColor: `${theme("colors.brandColor")} transparent`,
},
"*::-webkit-scrollbar": {
height: theme("spacing.2"),
width: theme("spacing.2"),
},
"*::-webkit-scrollbar-track": {
background: "transparent",
},
"*::-webkit-scrollbar-thumb": {
background: theme("colors.brandColor"),
borderRadius: theme("spacing.8"),
},
})
}),
plugin(
function ({ matchUtilities, theme }) {
matchUtilities(
{
"bg-radient": (value) => ({
"background-image": `radial-gradient(${value},var(--tw-gradient-stops))`,
}),
},
{ values: theme("radialGradients") },
)
},
{
theme: {
radialGradients: (() => {
const shapes = ["circle", "ellipse"]
const pos = {
c: "closest-side",
t: "at top",
b: "at bottom",
l: "at left",
r: "at right",
tl: "at top left",
tr: "at top right",
bl: "at bottom left",
br: "at bottom right",
}
let result = {}
for (const shape of shapes)
for (const [posName, posValue] of Object.entries(pos))
result[`${shape}-${posName}`] = `${shape} ${posValue}`
return result
})(),
},
},
),
formsPlugin,
],
}