personal-website/tailwind.config.mjs

35 lines
859 B
JavaScript
Raw Normal View History

2024-03-19 12:59:26 +01:00
/** @type {import('tailwindcss').Config} */
2024-04-02 21:04:11 +02:00
function withOpacity(variableName) {
return ({ opacityValue }) => {
if (opacityValue !== undefined) {
return `hsla(var(${variableName}), ${opacityValue})`
}
return `hsl(var(${variableName}))`
}
}
2024-03-19 12:59:26 +01:00
export default {
content: ['./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}'],
theme: {
extend: {
colors: {
2024-04-02 21:04:11 +02:00
bkg: withOpacity('--color-bkg'),
content: withOpacity('--color-content'),
primary: withOpacity('--color-primary'),
secondary: withOpacity('--color-secondary'),
accent: withOpacity('--color-accent'),
2024-04-05 12:03:13 +02:00
accentRed: withOpacity('--color-accent-red'),
},
},
2024-03-19 12:59:26 +01:00
},
plugins: [],
}
/*
--color-bkg: 0deg, 0%, 94%;
--color-content: 240deg, 4%, 9%;
--color-primary: 54deg, 100%, 50%;
--color-secondary: 237deg, 100%, 93%;
--color-accent: 262deg, 73%, 47%;
}
*/