-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtailwind.config.js
68 lines (64 loc) · 1.52 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
import plugin from "tailwindcss/plugin";
import tailwindcssImageRendering from "tailwindcss-image-rendering";
export default {
content: ["./src/**/*.{html,js,svelte,ts}"],
theme: {
extend: {
fontFamily: {
space: ['"Space Grotesk"', "sans-serif"],
},
animation: {
"spin-slow": "spin 8s linear infinite",
},
squircleRadius: {
sm: "2px",
md: "4px",
lg: "6px",
xl: "8px",
"2xl": "12px",
"3xl": "16px",
"4xl": "24px",
},
squircleSmooth: {
sm: "0.2",
md: "0.6",
lg: "0.8",
xl: "1",
},
},
},
plugins: [
tailwindcssImageRendering(), // Added safely with ES module import
// Squircle Radius Utilities
plugin(function ({ matchUtilities, theme }) {
matchUtilities(
{
"squircle-radius": (value) => ({
"--squircle-radius": value,
}),
},
{ values: theme("squircleRadius") },
);
}),
// Squircle Smooth Utilities
plugin(function ({ matchUtilities, theme }) {
matchUtilities(
{
"squircle-smooth": (value) => ({
"--squircle-smooth": value,
}),
},
{ values: theme("squircleSmooth") },
);
}),
// Squircle Mask Utility
plugin(function ({ addUtilities }) {
addUtilities({
".squircle": {
"-webkit-mask-image": "paint(squircle)",
"mask-image": "paint(squircle)",
},
});
}),
],
};