diff --git a/doc-src/content/CHANGELOG.markdown b/doc-src/content/CHANGELOG.markdown index 85f0c457..30a2ad33 100644 --- a/doc-src/content/CHANGELOG.markdown +++ b/doc-src/content/CHANGELOG.markdown @@ -14,6 +14,15 @@ The Documentation for the [latest stable release](http://compass-style.org/docs/ The Documentation for the [latest preview release](http://beta.compass-style.org/) +0.12.2 (UNRELEASED) +------------------- + +* [Vertical Rhythm Module] Removed the `$ie-font-ratio` constatnt in + favor of a more clear `$browser-default-font-size` constant. +* [Vertical Rhythm Module] The `establish-baseline` mixin now styles the + `` element instead of the `` element. This makes the + vertical rhythm module work better with `rem` based measurements. + 0.12.1 (03/14/2012) ------------------- diff --git a/frameworks/compass/stylesheets/compass/typography/_vertical_rhythm.scss b/frameworks/compass/stylesheets/compass/typography/_vertical_rhythm.scss index 040142b4..6184c03b 100644 --- a/frameworks/compass/stylesheets/compass/typography/_vertical_rhythm.scss +++ b/frameworks/compass/stylesheets/compass/typography/_vertical_rhythm.scss @@ -9,8 +9,8 @@ $base-line-height: 24px !default; // Set the default border style for rhythm borders. $default-rhythm-border-style: solid !default; -// The IE font ratio is a fact of life. Deal with it. -$ie-font-ratio: 16px / 100%; +// The default font size in all browsers. +$browser-default-font-size: 16px; // Set to false if you want to use absolute pixels in sizing your typography. $relative-font-sizing: true !default; @@ -55,12 +55,15 @@ $base-half-leader: $base-leader / 2; // Establishes a font baseline for the given font-size. @mixin establish-baseline($font-size: $base-font-size) { - body { - font-size: $font-size / $ie-font-ratio; - @include adjust-leading-to(1, if($relative-font-sizing, $font-size, $base-font-size)); + // IE 6 refuses to resize fonts set in pixels and it weirdly resizes fonts + // whose root is set in ems. So we set the root font size in percentages of + // the default font size. + * html { + font-size: 100% * ($font-size / $browser-default-font-size); } - html>body { + html { font-size: $font-size; + @include adjust-leading-to(1, if($relative-font-sizing, $font-size, $base-font-size)); } } diff --git a/test/fixtures/stylesheets/compass/css/vertical_rhythm.css b/test/fixtures/stylesheets/compass/css/vertical_rhythm.css index 24891e28..a0fee6f3 100644 --- a/test/fixtures/stylesheets/compass/css/vertical_rhythm.css +++ b/test/fixtures/stylesheets/compass/css/vertical_rhythm.css @@ -1,9 +1,9 @@ -body { - font-size: 87.5%; - line-height: 1.143em; } +* html { + font-size: 87.5%; } -html > body { - font-size: 14px; } +html { + font-size: 14px; + line-height: 1.143em; } .small { font-size: 0.857em;