pdf-to-markdown/ui/tailwind.config.js

36 lines
977 B
JavaScript
Raw Normal View History

2021-01-03 14:18:22 +01:00
module.exports = {
2021-01-03 20:09:46 +01:00
future: {
removeDeprecatedGapUtilities: true,
purgeLayersByDefault: true,
2021-01-03 14:18:22 +01:00
},
2021-01-03 20:09:46 +01:00
purge: {
content: ['./src/**/*.svelte', './src/**/*.ts'],
2021-01-03 14:18:22 +01:00
},
2021-01-03 20:09:46 +01:00
theme: {
extend: {},
2021-01-03 14:18:22 +01:00
},
2021-01-06 22:40:09 +01:00
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')),
});
},
],
2021-01-03 20:09:46 +01:00
};