tailwindcss/src/plugins/maxHeight.js
2019-02-28 12:06:32 -05:00

18 lines
403 B
JavaScript

import _ from 'lodash'
export default function() {
return function({ addUtilities, e, config }) {
const utilities = _.fromPairs(
_.map(config('theme.maxHeight'), (value, modifier) => {
return [
`.${e(`max-h-${modifier}`)}`,
{
'max-height': value,
},
]
})
)
addUtilities(utilities, config('variants.maxHeight'))
}
}