Add support for providing a default line-height for each font-size
This commit is contained in:
parent
9c82fecae9
commit
aa4fd1ae99
5 changed files with 439 additions and 402 deletions
|
|
@ -126,6 +126,7 @@ export default function({ corePlugins: corePluginConfig }) {
|
|||
fontFamily,
|
||||
fontWeight,
|
||||
height,
|
||||
fontSize,
|
||||
lineHeight,
|
||||
listStylePosition,
|
||||
listStyleType,
|
||||
|
|
@ -152,7 +153,6 @@ export default function({ corePlugins: corePluginConfig }) {
|
|||
tableLayout,
|
||||
textAlign,
|
||||
textColor,
|
||||
fontSize,
|
||||
fontStyle,
|
||||
textTransform,
|
||||
textDecoration,
|
||||
|
|
|
|||
|
|
@ -4,10 +4,17 @@ export default function() {
|
|||
return function({ addUtilities, e, theme, variants }) {
|
||||
const utilities = _.fromPairs(
|
||||
_.map(theme('fontSize'), (value, modifier) => {
|
||||
const [fontSize, lineHeight] = Array.isArray(value) ? value : [value]
|
||||
|
||||
return [
|
||||
`.${e(`text-${modifier}`)}`,
|
||||
{
|
||||
'font-size': value,
|
||||
'font-size': fontSize,
|
||||
...(lineHeight === undefined
|
||||
? {}
|
||||
: {
|
||||
'line-height': lineHeight,
|
||||
}),
|
||||
},
|
||||
]
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue