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

For rem value of font-size mixin, first divide $sizeValue by 1.6 ... #655

Closed
wants to merge 1 commit into from
Closed

Conversation

cmmarslender
Copy link

...since in browsers, 1rem is equal to 16px

if 1.6 is passed, we'd expect 1rem (1.6/1.6) = 1rem
if we passed 2.4 expecting 24px, we end up with 1.5 rem. 16 * 1.5 = 24px.

Old method would essentially add:
font-size: 16px;
font-size: 25.6px (because 1.6 rem = 16px * 1.6)

…ce in browsers, 1rem is equal to 16px

if 1.6 is passed, we'd expect 1rem (1.6/1.6) = 1rem
if we passed 2.4 expecting 24px, we end up with 1.5 rem. 16 * 1.5 = 24px.
@obenland
Copy link
Member

obenland commented Dec 1, 2014

...since in browsers, 1rem is equal to 16px

Not necessarily, and unfortunately not in our case. The rem unit is relative to the root—or the html—element. Since we set the font-size there to 10px, it's relative to that.

One more reason to make #617 happen asap.

/cc @philiparthurmoore @karmatosed

@obenland obenland closed this Dec 1, 2014
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 this pull request may close these issues.

2 participants