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

Can't use $line-height-base for padding/margins #2124

Closed
tampakis opened this issue Aug 13, 2019 · 1 comment · Fixed by #2125
Closed

Can't use $line-height-base for padding/margins #2124

tampakis opened this issue Aug 13, 2019 · 1 comment · Fixed by #2125

Comments

@tampakis
Copy link
Member

Replace the $line-height-base references because they don't resolve to pixel values. Default value is 1.5rem.
Screen Shot 2019-08-13 at 6 03 13 AM
Screen Shot 2019-08-13 at 6 03 04 AM

@jrochkind
Copy link
Member

jrochkind commented Aug 13, 2019

Hmm, my understanding is that it's preferable to use rem values for padding/margin, so they are proportional to font size, for people that change their browser default font size (accessibility reasons).

But you are right that 1.5 doesn't work, it would have to be 1.5rem.

I think you want margins and padding to be just expressed in terms of rem. You don't need to use the $line-height-base variable, you can just write say 1.5rem literal. That will be 1.5 of whatever main font size is set to. In the Bootstrap 4 variables file, most padding/margin values are set in terms of rem literals like this.

You may have to figure out how many pixels these were meant to be (in previous Bootstrap3-based blacklight), and convert them to proper rem with 16px==1rem default. So for instance if it was 20px before, it should be 20/16 == 1.25rem now.

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

Successfully merging a pull request may close this issue.

2 participants