tailwindcss/jit/corePlugins/lineHeight.js

16 lines
376 B
JavaScript
Raw Normal View History

const { asLength, nameClass } = require('../pluginUtils')
2021-04-02 14:12:47 -04:00
module.exports = function ({ matchUtilities }) {
matchUtilities({
leading: (modifier, { theme }) => {
let value = asLength(modifier, theme['lineHeight'])
if (value === undefined) {
return []
}
return { [nameClass('leading', modifier)]: { 'line-height': value } }
},
})
}