Added background blend effect on calendar details

This commit is contained in:
Alexis
2024-04-19 22:40:44 +02:00
parent 16395a22fc
commit 9bf3eea221
2 changed files with 80 additions and 2 deletions

View File

@@ -89,5 +89,25 @@ module.exports = {
}
}
},
plugins: [animate]
plugins: [
animate,
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'))
})
}
]
}