From 809394a1e9f81ca65354e5ae8f568939a906c6be Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Sat, 11 Jun 2011 23:21:56 -0700 Subject: [PATCH 1/4] make the micro-clearfix a replacement for pie-clearfix. Add a new legacy-pie-clearfix for users who still need the old clearfix. --- .../compass/utilities/general/_clearfix.scss | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss b/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss index 2959e5ae..73f9254c 100644 --- a/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss +++ b/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss @@ -18,7 +18,7 @@ // [Easy Clearing](http://www.positioniseverything.net/easyclearing.html) // has the advantage of allowing positioned elements to hang // outside the bounds of the container at the expense of more tricky CSS. -@mixin pie-clearfix { +@mixin legacy-pie-clearfix { &:after { content : "\0020"; display : block; @@ -30,14 +30,14 @@ @include has-layout; } -// An update to the PIE clearfix method that reduces the amount of CSS required -// [A new micro clearfix hack](http://nicolasgallagher.com/micro-clearfix-hack/) (25 April 2011) -@mixin micro-clearfix { - &:before, &:after { +// This is an updated version of the PIE clearfix method that reduces the amount of CSS output. +// If you need to support Firefox before 3.5 you need to use `legacy-pie-clearfix` instead. +// +// Adapted from: [A new micro clearfix hack](http://nicolasgallagher.com/micro-clearfix-hack/) +@mixin pie-clearfix { + &:after { content: ""; display: table; - } - &:after { clear: both; } @include has-layout; From 6ca90dccc3eaeefab32843d419501ee9c953630a Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Sat, 11 Jun 2011 23:27:16 -0700 Subject: [PATCH 2/4] Update changelog for clearfix --- doc-src/content/CHANGELOG.markdown | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc-src/content/CHANGELOG.markdown b/doc-src/content/CHANGELOG.markdown index dae64eab..588b699b 100644 --- a/doc-src/content/CHANGELOG.markdown +++ b/doc-src/content/CHANGELOG.markdown @@ -19,6 +19,9 @@ The Documentation for the [latest preview release](http://beta.compass-style.org **Note:** Due to some internal changes to compass you may have issue with your sass cache. Run `compass clean` to clear your cache. +* The `pie-clearfix` mixin has been updated. If you have to + support Firefox < 3.5, please update your stylesheets + to use `legacy-pie-clearfix` instead. * Added a new command: `compass clean` which removes any generated css files and clears the sass cache. * Enable IE 10 support for flexible box with the -ms prefix. @@ -32,7 +35,7 @@ The Documentation for the [latest preview release](http://beta.compass-style.org * Numerous small bug fixes to sprites. * Sprite Engines are now classes see [Docs](/help/tutorials/extending) for more information * Sprite classes have bee re-factored into modules for readability -* Sprites will no longer cause `undefined method 'find' for #` when adding or removing sprite files 0.11.2 (06/10/2011) ------------------- From a6a80221eefcce014e6b936e84440e6657d0137f Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Sat, 11 Jun 2011 23:35:29 -0700 Subject: [PATCH 3/4] update test for pie-clearfix --- .../fixtures/stylesheets/compass/css/legacy_clearfix.css | 9 +++++++++ test/fixtures/stylesheets/compass/css/utilities.css | 7 +++++++ .../stylesheets/compass/sass/legacy_clearfix.scss | 3 +++ test/fixtures/stylesheets/compass/sass/utilities.scss | 5 ++++- 4 files changed, 23 insertions(+), 1 deletion(-) diff --git a/test/fixtures/stylesheets/compass/css/legacy_clearfix.css b/test/fixtures/stylesheets/compass/css/legacy_clearfix.css index 2a287628..54086726 100644 --- a/test/fixtures/stylesheets/compass/css/legacy_clearfix.css +++ b/test/fixtures/stylesheets/compass/css/legacy_clearfix.css @@ -15,3 +15,12 @@ visibility: hidden; } .pie-clearfix { display: block; } + +.simplified-pie-clearfix { + display: inline-block; } + .simplified-pie-clearfix:after { + content: ""; + display: table; + clear: both; } + .simplified-pie-clearfix { + display: block; } diff --git a/test/fixtures/stylesheets/compass/css/utilities.css b/test/fixtures/stylesheets/compass/css/utilities.css index 354c84dc..8a6c64b1 100644 --- a/test/fixtures/stylesheets/compass/css/utilities.css +++ b/test/fixtures/stylesheets/compass/css/utilities.css @@ -12,6 +12,13 @@ overflow: hidden; visibility: hidden; } +.simple-pie-clearfix { + *zoom: 1; } + .simple-pie-clearfix:after { + content: ""; + display: table; + clear: both; } + p.light { background-color: #b0201e; color: black; } diff --git a/test/fixtures/stylesheets/compass/sass/legacy_clearfix.scss b/test/fixtures/stylesheets/compass/sass/legacy_clearfix.scss index 5a9f6396..906e49b1 100644 --- a/test/fixtures/stylesheets/compass/sass/legacy_clearfix.scss +++ b/test/fixtures/stylesheets/compass/sass/legacy_clearfix.scss @@ -7,5 +7,8 @@ $default-has-layout-approach: block; } .pie-clearfix { + @include legacy-pie-clearfix; +} +.simplified-pie-clearfix { @include pie-clearfix; } diff --git a/test/fixtures/stylesheets/compass/sass/utilities.scss b/test/fixtures/stylesheets/compass/sass/utilities.scss index 7daac2f6..d579a6ca 100644 --- a/test/fixtures/stylesheets/compass/sass/utilities.scss +++ b/test/fixtures/stylesheets/compass/sass/utilities.scss @@ -5,7 +5,10 @@ } .pie-clearfix { - @include pie-clearfix; + @include legacy-pie-clearfix; +} +.simple-pie-clearfix { + @include pie-clearfix; } p.light { @include contrasted(#B0201E); } From 2d81e0a5063d84da51e80968bf12796b4d17136c Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Sat, 11 Jun 2011 23:45:00 -0700 Subject: [PATCH 4/4] Fix bug --- lib/compass/compiler.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/compass/compiler.rb b/lib/compass/compiler.rb index 606f9406..fe00ef66 100644 --- a/lib/compass/compiler.rb +++ b/lib/compass/compiler.rb @@ -84,7 +84,7 @@ module Compass def run if new_config? # Wipe out the cache and force compilation if the configuration has changed. - FileUtils.rm_rf options[:cache_location] + remove options[:cache_location] options[:force] = true end