Add TailwindCSS

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2021-12-28 11:10:14 +01:00
parent 7f665daaf3
commit 65249b60f2
7 changed files with 196 additions and 9 deletions

21
js/tailwind.config.js Normal file
View File

@@ -0,0 +1,21 @@
function withOpacityValue(variable) {
return ({ opacityValue }) => {
if (opacityValue === undefined) {
return `rgb(var(${variable}))`;
}
return `rgb(var(${variable}) / ${opacityValue})`;
};
}
module.exports = {
content: ["./public/**/*.html", "./src/**/*.{vue,js,ts,jsx,tsx}"],
theme: {
extend: {
colors: {
primary: withOpacityValue("--color-primary"),
secondary: withOpacityValue("--color-secondary"),
},
},
},
plugins: [],
};