Update all core plugins to use the same class name generation strategy

This commit is contained in:
Adam Wathan 2020-10-16 10:24:16 -04:00
parent e897e40189
commit 11690b4c9b
48 changed files with 172 additions and 341 deletions

View file

@ -1,18 +1,5 @@
import _ from 'lodash'
import createUtilityPlugin from '../util/createUtilityPlugin'
export default function() {
return function({ addUtilities, e, theme, variants }) {
const utilities = _.fromPairs(
_.map(theme('width'), (value, modifier) => {
return [
`.${e(`w-${modifier}`)}`,
{
width: value,
},
]
})
)
addUtilities(utilities, variants('width'))
}
return createUtilityPlugin('width', [['w', ['width']]])
}