scottjehl/Respond — pull request #208 by philipwalton (2013-07-23 06:10:27+00:00)
Title: Reset the font-size of html and body before measuring the em value.

This pull requests fixes both of these bugs:

https://github.com/scottjehl/Respond/pull/134
https://github.com/scottjehl/Respond/issues/173

The first one is solved by reseting the `` and `

` elements' `font-size` value to `100%` before doing the measurement and then reseting them immediately afterward. In my testing I saw absolutely no FOUC, so I think this is a much better solution that the iframe method.

The second one seems to be fixable by only inserting the fake body into the DOM if it's not already there.

I've tested this and it works in IE7 and IE8 on my VM. Those were the only browsers I was able to check it in.