-
Notifications
You must be signed in to change notification settings - Fork 6
/
tailwind.config.ts
37 lines (35 loc) · 1.17 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
import type { Config } from "tailwindcss"
import colors from "tailwindcss/colors"
import { default as flattenColorPalette } from "tailwindcss/lib/util/flattenColorPalette"
export default {
content: ["./src/**/*.{html,svelte}"],
theme: {
extend: {
colors: {
gray: colors.neutral,
},
fontFamily: {
sans: "Exo2",
},
},
},
plugins: [
({ theme, matchUtilities }) => {
const backgroundSize = "4px 4px"
const backgroundImage = (color: string) =>
`linear-gradient(135deg, ${color} 10%, transparent 10%, transparent 50%, ${color} 50%, ${color} 60%, transparent 60%, transparent 100%)`
matchUtilities(
{
"bg-stripes": (value: string) => ({
"background-image": backgroundImage(value),
"background-size": backgroundSize,
}),
},
{
values: flattenColorPalette(theme("colors")),
type: "color",
},
)
},
],
} satisfies Config