pdf-to-markdown/ui/tailwind.config.js
Johannes Zillmann e6a18fa0d8 Filter for relevant items
* Don’t color Page in change color
* Tailwind: expose colors as CSS variables
2021-02-27 14:00:59 +01:00

36 lines
977 B
JavaScript

module.exports = {
future: {
removeDeprecatedGapUtilities: true,
purgeLayersByDefault: true,
},
purge: {
content: ['./src/**/*.svelte', './src/**/*.ts'],
},
theme: {
extend: {},
},
variants: {
extend: {},
},
plugins: [
function ({ addBase, theme }) {
function extractColorVars(colorObj, colorGroup = '') {
return Object.keys(colorObj).reduce((vars, colorKey) => {
const value = colorObj[colorKey];
const newVars =
typeof value === 'string'
? { [`--color${colorGroup}-${colorKey}`]: value }
: extractColorVars(value, `-${colorKey}`);
return { ...vars, ...newVars };
}, {});
}
addBase({
':root': extractColorVars(theme('colors')),
});
},
],
};