mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
24 lines
599 B
JavaScript
24 lines
599 B
JavaScript
import _ from 'lodash'
|
|
import usesCustomProperties from '../util/usesCustomProperties'
|
|
|
|
export default function() {
|
|
return function({ addUtilities, e, theme, variants, target }) {
|
|
const utilities = _.fromPairs(
|
|
_.map(theme('backgroundImage'), (value, modifier) => {
|
|
if (target('backgroundImage') === 'ie11' && usesCustomProperties(value)) {
|
|
return []
|
|
}
|
|
|
|
return [
|
|
`.${e(`bg-${modifier}`)}`,
|
|
{
|
|
'background-image': value,
|
|
},
|
|
]
|
|
})
|
|
)
|
|
|
|
addUtilities(utilities, variants('backgroundImage'))
|
|
}
|
|
}
|