Typography Field - Unitless Line Height
milutinjaric opened this issue · comments
Hi
Can you add 'number-only' option for line-height part of the Typography field https://developer.mozilla.org/en-US/docs/Web/CSS/line-height
Regards.
I can look into it. FYI, em
and no value are the same thing.
Thanks for quick response. Unfortunately, It is not the same. Let's say parent has line-height 1.2 and child has different font size. Child's line height would be it's font-size * line height while if parent had 1.2em child's line-height would be equal to parent's line height.
Added a new field argument, line-height-unit
that you can set to blank. This will eliminate any unit from the output. See: https://devs.redux.io/core-fields/typography.html
You'll have to install the version of Redux from this repo. I have no immediate ETA of when the .org library will be updated.
Caveat: If you change your code, any existing user who has saved typography values will need to resave their typography field to update to the new value with no unit.