IE7 requires html { font-size: 100%; } in establish-baseline() #1520

Open
wants to merge 2 commits into
from

Conversation

Projects
None yet
3 participants
Contributor

JohnAlbin commented Jan 19, 2014

I was checking out the updated vertical-rhythm module and saw that * html { font-size: 100%; } is only added for IE 6. I seemed to remember that IE 7 also required that. So I looked it up…

IE 6 and 7 cannot resize fonts set with px. http://alistapart.com/article/howtosizetextincss#section3

IE 6 and 7 resize fonts weirdly when set with em. http://alistapart.com/article/howtosizetextincss#section4

Since IE7 doesn't understand the * html selector hack, we have to switch to the *property hack that both IE 6 and IE 7 know (but IE 8 and above do not.)

Contributor

JohnAlbin commented Jan 19, 2014

Here's a more recent reference that shows it's both IE 6 and IE 7 that need the percent font.
https://github.com/necolas/normalize.css/blob/v1/normalize.css#L62

@@ -95,16 +95,15 @@ $relative-font-sizing: if($rhythm-unit == px, false, true);
// Establishes a font baseline for the given font-size.
@mixin establish-baseline($font-size: $base-font-size) {
- $relative-size: 100% * ($font-size / $browser-default-font-size);
@mirisuzanne

mirisuzanne Jan 22, 2014

Owner

Why was this line removed? $relative-size is still called on line 99, and now throws an error in the tests. This line should stay and be added to the new line 105 as well. No reason to duplicate that math.

Owner

mirisuzanne commented Jan 22, 2014

Thanks @JohnAlbin! Can you fix the broken variable, and get the tests passing? There are instructions for writing and running the tests in CONTRIBUTING.md file.

JohnAlbin added a commit to JohnAlbin/compass that referenced this pull request Jan 22, 2014

Contributor

JohnAlbin commented Jan 22, 2014

Ok. The tests are "fixed". Except that they are still being reported as broken because the new tests depend on #1524, so that we can actually test when IE7 support is turned off.

JohnAlbin added a commit to JohnAlbin/compass that referenced this pull request Feb 10, 2014

Owner

chriseppstein commented Aug 18, 2014

#1524 was rejected, so can we get this rebased off of master?

Owner

chriseppstein commented Aug 18, 2014

I mean stable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment