Files
MyBlog-Next/tailwind.config.cjs
T
2022-09-08 22:40:45 +06:30

32 lines
723 B
JavaScript

/** @type {import('tailwindcss').Config} */
function withOpacity(variableName) {
return ({ opacityValue }) => {
if (opacityValue !== undefined) {
return `rgba(var(${variableName}), ${opacityValue})`;
}
return `rgb(var(${variableName}))`;
};
}
module.exports = {
content: ["./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}"],
theme: {
extend: {
textColor: {
skin: {
base: withOpacity("--color-text-base"),
accent: withOpacity("--color-text-accent"),
},
},
backgroundColor: {
skin: {
fill: withOpacity("--color-fill"),
card: withOpacity("--color-card"),
},
},
},
},
plugins: [],
};