Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ryan-exe opened this issue Mar 28, 2019 · 3 comments
Open

Comments

@ryan-exe
Copy link

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).

@porsager
Copy link
Owner

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

@ryan-exe
Copy link
Author

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

@porsager
Copy link
Owner

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 porsager reopened this Mar 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants