scottjehl/Respond

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

Opened this issue · 0 comments

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 = "";
}