Support configuring a single list of variants to apply to all relevant plugins

This commit is contained in:
Adam Wathan 2019-04-18 09:42:21 -04:00
parent 43f63bf2e5
commit f0bc35a896
71 changed files with 255 additions and 128 deletions

View file

@ -1,7 +1,7 @@
import _ from 'lodash'
export default function() {
return function({ addUtilities, e, config }) {
return function({ addUtilities, e, config, variants }) {
const utilities = _.fromPairs(
_.map(config('theme.width'), (value, modifier) => {
return [
@ -13,6 +13,6 @@ export default function() {
})
)
addUtilities(utilities, config('variants.width'))
addUtilities(utilities, variants('width'))
}
}