tailwindcss/jit/corePlugins/backgroundImage.js

16 lines
353 B
JavaScript
Raw Normal View History

const { nameClass } = require('../pluginUtils')
2021-04-02 14:12:47 -04:00
module.exports = function ({ matchUtilities }) {
matchUtilities({
bg: (modifier, { theme }) => {
let value = theme.backgroundImage[modifier]
if (value === undefined) {
return []
}
return { [nameClass('bg', modifier)]: { 'background-image': value } }
},
})
}