tailwindcss/jit/corePlugins/textOpacity.js

16 lines
390 B
JavaScript
Raw Normal View History

const { asValue, nameClass } = require('../pluginUtils')
2021-04-02 14:12:47 -04:00
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 } }
},
})
}