generated from flo/template-frontend
76 lines
2.4 KiB
JavaScript
76 lines
2.4 KiB
JavaScript
function withOpacity(variableName) {
|
|
return ({ opacityValue }) => {
|
|
if (opacityValue !== undefined) {
|
|
return `rgba(var(${variableName}), ${opacityValue})`;
|
|
}
|
|
return `rgb(var(${variableName}))`;
|
|
};
|
|
}
|
|
|
|
/** @type {import('tailwindcss').Config} */
|
|
module.exports = {
|
|
content: ["./src/**/*.{html,ts}", "./node_modules/flowbite/**/*.js"],
|
|
theme: {
|
|
extend: {
|
|
// "foregrounds"
|
|
textColor: {
|
|
skin: {
|
|
primary: withOpacity("--color-text-primary"),
|
|
"primary-muted": withOpacity("--color-text-primary-muted"),
|
|
secondary: withOpacity("--color-text-secondary"),
|
|
"secondary-muted": withOpacity("--color-text-secondary-muted"),
|
|
accent: withOpacity("--color-text-accent"),
|
|
"accent-muted": withOpacity("--color-text-accent-muted"),
|
|
},
|
|
},
|
|
fill: {
|
|
skin: {
|
|
primary: withOpacity("--color-text-primary"),
|
|
"primary-muted": withOpacity("--color-text-primary-muted"),
|
|
secondary: withOpacity("--color-text-secondary"),
|
|
"secondary-muted": withOpacity("--color-text-secondary-muted"),
|
|
accent: withOpacity("--color-text-accent"),
|
|
"accent-muted": withOpacity("--color-text-accent-muted"),
|
|
},
|
|
},
|
|
|
|
// "backgrounds"
|
|
backgroundColor: {
|
|
skin: {
|
|
primary: withOpacity("--color-background-primary"),
|
|
"primary-muted": withOpacity("--color-background-primary-muted"),
|
|
secondary: withOpacity("--color-background-secondary"),
|
|
"secondary-muted": withOpacity("--color-background-secondary-muted"),
|
|
accent: withOpacity("--color-background-accent"),
|
|
"accent-muted": withOpacity("--color-background-accent-muted"),
|
|
},
|
|
},
|
|
|
|
// "delicate lines"
|
|
boxShadowColor: {
|
|
skin: {
|
|
primary: withOpacity("--color-text-secondary-muted"),
|
|
},
|
|
},
|
|
ringColor: {
|
|
skin: {
|
|
primary: withOpacity("--color-text-secondary-muted"),
|
|
accent: withOpacity("--color-text-accent-muted"),
|
|
},
|
|
},
|
|
divideColor: {
|
|
skin: {
|
|
primary: withOpacity("--color-text-secondary-muted"),
|
|
},
|
|
},
|
|
borderColor: {
|
|
skin: {
|
|
primary: withOpacity("--color-text-secondary-muted"),
|
|
accent: withOpacity("--color-text-accent-muted"),
|
|
},
|
|
},
|
|
},
|
|
},
|
|
plugins: [require("flowbite/plugin")],
|
|
};
|