tailwindcss/jit/corePlugins/textOpacity.js
2021-04-02 14:34:50 -04:00

16 lines
390 B
JavaScript

const { asValue, nameClass } = require('../pluginUtils')
module.exports = function ({ matchUtilities }) {
matchUtilities({
'text-opacity': (modifier, { theme }) => {
let value = asValue(modifier, theme.textOpacity)
if (value === undefined) {
return []
}
return { [nameClass('text-opacity', modifier)]: { '--tw-text-opacity': value } }
},
})
}