From c5041fbcb9a1a06c95f8e1b1d05201e492afb875 Mon Sep 17 00:00:00 2001 From: JohnAlbin Date: Sat, 14 Apr 2012 11:18:59 +0800 Subject: [PATCH 1/3] Add $offset parameter to rhythm() function. --- .../stylesheets/compass/typography/_vertical_rhythm.scss | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/frameworks/compass/stylesheets/compass/typography/_vertical_rhythm.scss b/frameworks/compass/stylesheets/compass/typography/_vertical_rhythm.scss index accdfe21..999d1fb3 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. From bfb2ebe88be7cc6ba44cfe84ddbeaaebede79572 Mon Sep 17 00:00:00 2001 From: Matt Farmer Date: Thu, 19 Apr 2012 15:47:27 -0400 Subject: [PATCH 2/3] Fix ordering of font properties in reset-font for FF's benefit. Firefox gets persnickety about how regular CSS properties and shorthand properties interact, specifically specifying a shorthand version after the regular property causes the regular property to be overriden. Closes GH-852. --- frameworks/compass/stylesheets/compass/reset/_utilities.scss | 2 +- test/fixtures/stylesheets/blueprint/css/screen.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frameworks/compass/stylesheets/compass/reset/_utilities.scss b/frameworks/compass/stylesheets/compass/reset/_utilities.scss index 41d5add8..d9d03f17 100644 --- a/frameworks/compass/stylesheets/compass/reset/_utilities.scss +++ b/frameworks/compass/stylesheets/compass/reset/_utilities.scss @@ -67,8 +67,8 @@ // Reset the font and vertical alignment. @mixin reset-font { - font-size: 100%; font: inherit; + font-size: 100%; vertical-align: baseline; } // Resets the outline when focus. diff --git a/test/fixtures/stylesheets/blueprint/css/screen.css b/test/fixtures/stylesheets/blueprint/css/screen.css index 391a8e02..371836e6 100644 --- a/test/fixtures/stylesheets/blueprint/css/screen.css +++ b/test/fixtures/stylesheets/blueprint/css/screen.css @@ -14,8 +14,8 @@ time, mark, audio, video { margin: 0; padding: 0; border: 0; - font-size: 100%; font: inherit; + font-size: 100%; vertical-align: baseline; } body { From 5c44dda6adb0c38f0265f9a0ca2a782e8087c072 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Fri, 27 Apr 2012 08:13:08 -0700 Subject: [PATCH 3/3] Compass.app costs $10 now. --- doc-src/content/index.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc-src/content/index.haml b/doc-src/content/index.haml index daab61a0..887e654f 100644 --- a/doc-src/content/index.haml +++ b/doc-src/content/index.haml @@ -91,7 +91,7 @@ layout: homepage %img(src="/images/compass.app.png") %p Buy Compass.app - for Windows and Mac for just $7. + for Windows and Mac for just $10. %p.note Note: Compass.app is a product of Handlino, Inc but 30% of all proceeds go to Compass's charity of choice: UMDF.org.