generated from cavalluccijohann/Nuxt-Starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tailwind.config.ts
31 lines (29 loc) · 722 Bytes
/
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
import type { Config } from "tailwindcss";
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"),
},
},
},
plugins: [],
} satisfies Config;