tailwindcss/src/plugins/maxHeight.js
2019-04-18 23:29:07 +02:00

19 lines
398 B
JavaScript

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