-
Notifications
You must be signed in to change notification settings - Fork 0
/
tailwind.config.ts
131 lines (126 loc) · 4.32 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
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
import type { Config } from "tailwindcss";
import defaultTheme from "tailwindcss/defaultTheme";
import plugin from "tailwindcss/plugin";
import typography from "@tailwindcss/typography"
const gridColsFlowPlugin = plugin(
({ matchUtilities, theme }: { matchUtilities: any; theme: any }) => {
matchUtilities(
{
"grid-cols-flow": (value: any) => {
return {
"grid-template-columns": `repeat(auto-fill, minmax(${value}, 1fr))`,
};
},
},
{
values: theme("width"),
}
);
}
);
const animationDelayPlugin = plugin(
({ matchUtilities, theme }: { matchUtilities: any; theme: any }) => {
matchUtilities(
{
"animation-delay": (value: any) => {
return {
"animation-delay": value,
};
},
},
{
values: theme("transitionDelay"),
}
);
}
);
const animationFillPlugin = plugin(
({ matchUtilities, theme }: { matchUtilities: any; theme: any }) => {
matchUtilities(
{
"animation-fill": (value: any) => {
return {
"animation-fill-mode": value,
};
},
},
{
values: theme("animationFillMode"),
}
);
},
{
theme: {
animationFillMode: {
none: "none",
forward: "forwards",
backward: "backwards",
both: "both",
},
},
}
);
const config: Config = {
content: ["./src/**/*.{js,ts,jsx,tsx,mdx}", "./posts/*.mdx"],
darkMode: "class",
theme: {
extend: {
fontFamily: {
sans: ["var(--font-rubik)", ...defaultTheme.fontFamily.sans],
mono: ["var(--font-neon)", ...defaultTheme.fontFamily.mono],
},
keyframes: {
"fade-up": {
"0%": {
opacity: "0",
transform: "translateY(10px)",
},
"100%": {
opacity: "1",
transform: "translateY(0)",
},
},
},
animation: {
"bounce-slow": "bounce 2s infinite",
"fade-up": "fade-up 0.5s ease-out",
},
colors: {
bkg: 'hsl(var(--color-bkg) / <alpha-value>)',
content: 'hsl(var(--color-content) / <alpha-value>)',
accent: 'hsl(var(--color-accent) / <alpha-value>)',
},
boxShadow: {
"i-sm": "0px 0px 5px 0px #00000005, 0px 2px 10px 0px #00000002, inset 0px 0px 5px 0px hsla(0,0%,100%,.25)",
"i-md": "0px 0px 15px 0px #00000006, 0px 2px 30px 0px #00000016, inset 0px 0px 5px 0px hsla(0,0%,100%,.25)",
"i-lg": "0px 0px 30px 0px #00000007, 0px 30px 60px 0px #00000027, inset 0px 0px 5px 0px hsla(0,0%,100%,.25)",
},
screens: {
'can-hover': { 'raw': '(hover: hover)' },
'hover-none': { 'raw': '(hover: none)' },
},
typography: ({ theme }: { theme: any }) => ({
DEFAULT: {
css: {
code: {
backgroundColor: 'hsl(var(--color-content) / 0.05)',
borderRadius: theme('borderRadius.md'),
paddingTop: theme('padding[1]'),
paddingRight: theme('padding[1.5]'),
paddingBottom: theme('padding[1]'),
paddingLeft: theme('padding[1.5]'),
},
'code::before': {
content: 'normal',
},
'code::after': {
content: 'normal',
},
},
},
}),
},
},
plugins: [gridColsFlowPlugin, animationDelayPlugin, animationFillPlugin, typography],
};
export default config;