diff --git a/frameworks/compass/stylesheets/compass/typography/_vertical_rhythm.scss b/frameworks/compass/stylesheets/compass/typography/_vertical_rhythm.scss index accdfe218b..999d1fb33c 100644 --- a/frameworks/compass/stylesheets/compass/typography/_vertical_rhythm.scss +++ b/frameworks/compass/stylesheets/compass/typography/_vertical_rhythm.scss @@ -111,12 +111,13 @@ $base-half-leader: $base-leader / 2; // Calculate rhythm units. @function rhythm( $lines: 1, - $font-size: $base-font-size + $font-size: $base-font-size, + $offset: 0 ) { @if not $relative-font-sizing and $font-size != $base-font-size { @warn "$relative-font-sizing is false but a relative font size was passed to the rhythm function"; } - $rhythm: $font-unit * $lines * $base-line-height / $font-size; + $rhythm: $font-unit * ($lines * $base-line-height - $offset) / $font-size; // Round the pixels down to nearest integer. @if unit($rhythm) == px { $rhythm: floor($rhythm); @@ -183,7 +184,7 @@ $base-half-leader: $base-leader / 2; style: $border-style; width: $font-unit * $width / $font-size; }; - padding-#{$side}: $font-unit / $font-size * ($lines * $base-line-height - $width); + padding-#{$side}: rhythm($lines, $font-size, $offset: $width); } // Apply borders and whitespace equally to all sides. @@ -195,7 +196,7 @@ $base-half-leader: $base-leader / 2; style: $border-style; width: $font-unit * $width / $font-size; }; - padding: $font-unit / $font-size * ($lines * $base-line-height - $width); + padding: rhythm($lines, $font-size, $offset: $width); } // Apply a leading border.