tailwindcss/src/plugins/height.js

19 lines
382 B
JavaScript
Raw Normal View History

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