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

getEmValue does not always reset the font-size for body element #337

Open
IBestuzhev opened this issue Jul 10, 2015 · 0 comments
Open

getEmValue does not always reset the font-size for body element #337

IBestuzhev opened this issue Jul 10, 2015 · 0 comments

Comments

@IBestuzhev
Copy link

With default bootstrap css I have the following rules

html { font-size: 10px }
body { font-size: 14px }

getEmValue sets body.style.fontSize = "100%" to measure the em, but when it resets the value:

if (originalBodyFontSize) {
  body.style.fontSize = originalBodyFontSize;
}

it does not reset if font size was not set inline like <body style="font-size: 14px">. So I got my CSS rules for font-size reverted to 10px;

I suppose it should reset it like

if (originalBodyFontSize) {
  body.style.fontSize = originalBodyFontSize;
} else {
  body.style.fontSize = "";
}
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

1 participant