bss icon indicating copy to clipboard operation
bss copied to clipboard

Line Height when given a unitless value doesn't return as expected

Open ryan-exe opened this issue 5 years ago • 3 comments

G'day, love BSS - keep up the good work 🙌

I'm trying to use a unitless value for line-height (MDN) however bss is adding 'px'.

For example, when I pass in 1.25 as an int or the string '1.25', I am getting 1.25px however I want 1.25 (uses the number multiplied by the element's font size).

ryan-exe avatar Mar 28 '19 05:03 ryan-exe

Thx a lot Ryan 😊

I've got an issue mentioning that, I'll just try to find, and there's a fix in the upcoming v2, but until then you can get around it by wrapping your value in calc

porsager avatar Mar 28 '19 05:03 porsager

Thanks a lot! Could also use 125% as well, I just thought I'd mention it 😎

ryan-exe avatar Mar 28 '19 06:03 ryan-exe

Yeah, I think we should just keep this issue open, I couldn't find one specifically for line-height :)

btw, percent might not mean exactly what you think ;) https://developer.mozilla.org/en-US/docs/Web/CSS/line-height#Prefer_unitless_numbers_for_line-height_values

porsager avatar Mar 28 '19 07:03 porsager