tailwindcss/jit/corePlugins/lineHeight.js
2021-04-02 14:34:50 -04:00

16 lines
376 B
JavaScript

const { asLength, nameClass } = require('../pluginUtils')
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 } }
},
})
}