tailwindcss/src/plugins/width.js

19 lines
379 B
JavaScript
Raw Normal View History

import _ from 'lodash'
2019-02-28 12:39:17 -05:00
export default function() {
return function({ addUtilities, e, theme, variants }) {
2019-01-11 12:29:33 -05:00
const utilities = _.fromPairs(
_.map(theme('width'), (value, modifier) => {
2019-01-11 12:29:33 -05:00
return [
`.${e(`w-${modifier}`)}`,
{
width: value,
},
]
})
)
addUtilities(utilities, variants('width'))
}
}