mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 11:29:33 +08:00
46 lines
1.1 KiB
JavaScript
46 lines
1.1 KiB
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"),
|
|
},
|
|
},
|
|
borderColor: {
|
|
skin: {
|
|
line: withOpacity("--color-border"),
|
|
},
|
|
},
|
|
fill: {
|
|
skin: {
|
|
base: withOpacity("--color-text-base"),
|
|
accent: withOpacity("--color-text-accent"),
|
|
},
|
|
},
|
|
fontFamily: {
|
|
mono: ["IBM Plex Mono", "monospace"],
|
|
},
|
|
},
|
|
},
|
|
plugins: [require("@tailwindcss/typography")],
|
|
};
|