2024-03-21 21:40:45 +00:00
|
|
|
import flattenColorPalette from 'tailwindcss/lib/util/flattenColorPalette';
|
|
|
|
|
|
2023-10-28 00:26:41 +00:00
|
|
|
/** @type {import('tailwindcss').Config} */
|
|
|
|
|
export default {
|
|
|
|
|
content: ['./src/**/*.{html,svelte,js,ts}'],
|
|
|
|
|
theme: {
|
2024-03-21 21:40:45 +00:00
|
|
|
extend: {
|
|
|
|
|
animation:{
|
|
|
|
|
scroll:
|
|
|
|
|
'scroll var(--animation-duration, 40s) var(--animation-direction, forwards) linear infinite'
|
|
|
|
|
},
|
|
|
|
|
keyframes:{
|
|
|
|
|
scroll: {
|
|
|
|
|
to: {
|
|
|
|
|
transform: 'translate(calc(-50% - 0.5rem))'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-10-28 00:26:41 +00:00
|
|
|
},
|
|
|
|
|
plugins: [require('daisyui')],
|
|
|
|
|
daisyui: {
|
|
|
|
|
themes: [
|
|
|
|
|
{
|
|
|
|
|
darkmode: {
|
|
|
|
|
...require('daisyui/src/theming/themes')['[data-theme=business]'],
|
|
|
|
|
primary: '#0099cc',
|
|
|
|
|
'base-100': '#212933',
|
|
|
|
|
info: '#d1d1d1',
|
|
|
|
|
},
|
|
|
|
|
lightmode: {
|
|
|
|
|
...require('daisyui/src/theming/themes')['[data-theme=corporate]'],
|
|
|
|
|
primary: '#80dfff',
|
|
|
|
|
'base-100': '#f3f4f6',
|
|
|
|
|
info: '#d1d1d1',
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
base: true,
|
|
|
|
|
styled: true,
|
|
|
|
|
utils: true
|
|
|
|
|
}
|
|
|
|
|
};
|
2024-03-21 21:40:45 +00:00
|
|
|
|
|
|
|
|
function addVariablesForColors({ addBase, theme }) {
|
|
|
|
|
let allColors = flattenColorPalette(theme('colors'));
|
|
|
|
|
let newVars = Object.fromEntries(
|
|
|
|
|
Object.entries(allColors).map(([key, val]) => [`--${key}`, val])
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
addBase({
|
|
|
|
|
':root': newVars
|
|
|
|
|
});
|
|
|
|
|
}
|