generated from cavalluccijohann/Nuxt-Starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtailwind.config.ts
69 lines (67 loc) · 1.47 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
import type { Config } from "tailwindcss";
const plugin = require('tailwindcss/plugin')
function withOpacity(variableName: string) {
return ({ opacityValue }) => {
if (opacityValue !== undefined) {
return `rgba(var(${variableName}), ${opacityValue})`;
}
return `rgb(var(${variableName}))`;
};
}
export default {
darkMode: "class",
content: [
"./components/**/*.{js,vue,ts}",
"./layouts/**/*.vue",
"./pages/**/*.vue",
"./app.vue",
"./error.vue",
],
theme: {
extend: {
colors: {
"color-primary": withOpacity("--color-primary"),
"color-background": withOpacity("--color-background"),
"color-text": withOpacity("--color-text"),
},
animation: {
movex: 'movex 3s infinite',
},
keyframes: {
movex: {
from: {
left: '0',
opacity: '0',
},
'25%': {
opacity: '1',
},
"50%": {
left: '100%',
opacity: '0',
},
to: {
left: '100%',
opacity: '0',
},
},
},
},
},
plugins: [
plugin(({ matchUtilities, theme }) => {
matchUtilities(
{
'animation-delay': (value) => {
return {
'animation-delay': value,
}
},
},
{
values: theme('transitionDelay'),
}
)
}),
],
} satisfies Config;