tailwindcss/src/plugins/maxHeight.js

19 lines
398 B
JavaScript
Raw Normal View History

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