Replace confusing $ie-font-ratio variable with $browser-default-font-size in vertical_rhythm partial. fixes #766

This commit is contained in:
JohnAlbin 2012-03-12 17:44:02 +08:00 committed by Chris Eppstein
parent dd629b1b23
commit 48bfe186af
3 changed files with 23 additions and 11 deletions

View File

@ -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
`<html>` element instead of the `<body>` element. This makes the
vertical rhythm module work better with `rem` based measurements.
0.12.1 (03/14/2012)
-------------------

View File

@ -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));
}
}

View File

@ -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;