From 40d0e623d049c11d25de14266d4a590fef51fe7f Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Mon, 14 Mar 2011 16:08:35 -0700 Subject: [PATCH 1/5] Use a single staleness checker during a compile run to speed up dependency checking. --- lib/compass/compiler.rb | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/lib/compass/compiler.rb b/lib/compass/compiler.rb index 086e1d3b..cc887a70 100644 --- a/lib/compass/compiler.rb +++ b/lib/compass/compiler.rb @@ -3,7 +3,7 @@ module Compass include Actions - attr_accessor :working_path, :from, :to, :options + attr_accessor :working_path, :from, :to, :options, :staleness_checker, :importer def initialize(working_path, from, to, options) self.working_path = working_path @@ -12,6 +12,8 @@ module Compass self.options = options self.options[:cache_location] ||= determine_cache_location Compass.configure_sass_plugin! + self.importer = Sass::Importers::Filesystem.new(from) + self.staleness_checker = Sass::Plugin::StalenessChecker.new(options) end def determine_cache_location @@ -23,6 +25,10 @@ module Compass @sass_files = self.options[:sass_files] || Dir.glob(separate("#{from}/**/#{'[^_]' if exclude_partials}*.s[ac]ss")) end + def relative_stylesheet_name(sass_file) + sass_file[("#{from}/".length)..-1] + end + def stylesheet_name(sass_file) sass_file[("#{from}/".length)..-6] end @@ -42,11 +48,15 @@ module Compass # Returns the sass file that needs to be compiled, if any. def out_of_date? sass_files.zip(css_files).each do |sass_filename, css_filename| - return sass_filename if Sass::Plugin.send(:stylesheet_needs_update?, css_filename, sass_filename) + return sass_filename if needs_update?(css_filename, sass_filename) end false end + def needs_update?(css_filename, sass_filename) + staleness_checker.stylesheet_needs_update?(css_filename, relative_stylesheet_name(sass_filename), importer) + end + # Determines if the configuration file is newer than any css file def new_config? config_file = Compass.detect_configuration_file @@ -123,7 +133,7 @@ module Compass end def should_compile?(sass_filename, css_filename) - options[:force] || Sass::Plugin.send(:stylesheet_needs_update?, css_filename, sass_filename) + options[:force] || needs_update?(css_filename, sass_filename) end # A sass engine for compiling a single file. From ca97c44b6017b3cc16d7966cb540d29db32758de Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Tue, 15 Mar 2011 14:46:54 -0700 Subject: [PATCH 2/5] Update sass dependency for new staleness checker api --- compass.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compass.gemspec b/compass.gemspec index 481db7a2..0003448a 100644 --- a/compass.gemspec +++ b/compass.gemspec @@ -16,7 +16,7 @@ Gem::Specification.new do |gemspec| gemspec.rubygems_version = "1.3.5" gemspec.summary = %q{A Real Stylesheet Framework} - gemspec.add_dependency 'sass', '>= 3.1.0.alpha.218' + gemspec.add_dependency 'sass', '>= 3.1.0.alpha.249' gemspec.add_dependency 'chunky_png', '~> 0.12.0' gemspec.files = %w(README.markdown LICENSE.markdown VERSION.yml Rakefile) From 0d29379b4457e80bc045f98ad7bd1db9626fe9d0 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Tue, 15 Mar 2011 16:03:04 -0700 Subject: [PATCH 3/5] Font face file no longer needs a UTF-8 Charset. --- frameworks/compass/stylesheets/compass/css3/_font-face.scss | 1 - 1 file changed, 1 deletion(-) diff --git a/frameworks/compass/stylesheets/compass/css3/_font-face.scss b/frameworks/compass/stylesheets/compass/css3/_font-face.scss index c8475053..b110d25a 100644 --- a/frameworks/compass/stylesheets/compass/css3/_font-face.scss +++ b/frameworks/compass/stylesheets/compass/css3/_font-face.scss @@ -1,4 +1,3 @@ -@charset "UTF-8"; @import "shared"; // Cross-browser support for @font-face. Supports IE, Gecko, Webkit, Opera. From 7057f0f5bdeaa02fae7dc05fd2ee138c03eef929 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Tue, 15 Mar 2011 17:09:46 -0700 Subject: [PATCH 4/5] Release documentation. --- Gemfile | 2 +- Gemfile.lock | 8 ++++---- doc-src/Gemfile | 2 +- doc-src/Gemfile.lock | 8 ++++---- doc-src/content/CHANGELOG.markdown | 33 ++++++++++++++++++++++-------- 5 files changed, 34 insertions(+), 19 deletions(-) diff --git a/Gemfile b/Gemfile index 5a4d1042..47b93610 100644 --- a/Gemfile +++ b/Gemfile @@ -6,7 +6,7 @@ gem "rspec", "~>2.0.0" gem "rails", "~>3.0.0.rc" gem "compass-validator", "3.0.0" gem "css_parser", "~> 1.0.1" -gem "sass", ">= 3.1.0.alpha.218" +gem "sass", "3.1.0.alpha.249" gem "haml", "~> 3.1.0.alpha" gem "rcov" gem "rubyzip" diff --git a/Gemfile.lock b/Gemfile.lock index 9ff9fa15..3a28704c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,9 +1,9 @@ PATH remote: . specs: - compass (0.11.beta.2.132621c) + compass (0.11.beta.2.0d29379) chunky_png (~> 0.12.0) - sass (>= 3.1.0.alpha.218) + sass (>= 3.1.0.alpha.249) GEM remote: http://rubygems.org/ @@ -105,7 +105,7 @@ GEM ruby-json (1.1.2) ruby-prof (0.9.2) rubyzip (0.9.4) - sass (3.1.0.alpha.221) + sass (3.1.0.alpha.249) term-ansicolor (1.0.5) thor (0.14.6) treetop (1.4.9) @@ -128,4 +128,4 @@ DEPENDENCIES rspec (~> 2.0.0) ruby-prof rubyzip - sass (>= 3.1.0.alpha.218) + sass (= 3.1.0.alpha.249) diff --git a/doc-src/Gemfile b/doc-src/Gemfile index aea55426..5eebcc3e 100644 --- a/doc-src/Gemfile +++ b/doc-src/Gemfile @@ -8,7 +8,7 @@ gem 'mime-types' gem 'serve', "1.0.0" gem 'nokogiri' gem 'coderay' -gem 'sass', ">= 3.1.0.alpha.50" +gem 'sass', ">= 3.1.0.alpha.249" gem 'fssm', '0.1.2' gem 'haml', ">= 3.1.0.alpha.36" gem 'rake' diff --git a/doc-src/Gemfile.lock b/doc-src/Gemfile.lock index 41698cae..738b38e5 100644 --- a/doc-src/Gemfile.lock +++ b/doc-src/Gemfile.lock @@ -8,9 +8,9 @@ GIT PATH remote: .. specs: - compass (0.11.beta.2.65cf2f9) + compass (0.11.beta.2.0d29379) chunky_png (~> 0.12.0) - sass (>= 3.1.0.alpha.218) + sass (>= 3.1.0.alpha.249) GEM remote: http://rubygems.org/ @@ -34,7 +34,7 @@ GEM rake (0.8.7) rdiscount (1.6.5) ruby-prof (0.9.2) - sass (3.1.0.alpha.221) + sass (3.1.0.caring.0) serve (1.0.0) activesupport (~> 3.0.1) i18n (~> 0.4.1) @@ -62,6 +62,6 @@ DEPENDENCIES rake rdiscount ruby-prof - sass (>= 3.1.0.alpha.50) + sass (>= 3.1.0.alpha.249) serve (= 1.0.0) thor diff --git a/doc-src/content/CHANGELOG.markdown b/doc-src/content/CHANGELOG.markdown index fc7f6811..24917d0f 100644 --- a/doc-src/content/CHANGELOG.markdown +++ b/doc-src/content/CHANGELOG.markdown @@ -14,25 +14,40 @@ 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.11.beta.3 (UNRELEASED) +0.11.beta.3 (3/15/2011) ------------------------ -* There is a new typography module: Vertical Rhythm. - This makes it easier to align the typography of your page to a common rhythm. + +### Compass CSS3 + +* A new CSS3 mixin for [appearance](/reference/compass/css3/appearance/) was added. +* The font-face mixin has been updated again with the [syntax recommendations + from font-spring](http://www.fontspring.com/blog/the-new-bulletproof-font-face-syntax). + The API has not changed. + +### Compass Typography + * Some text-based mixins have been moved from utilities to the new typography module. The old imports are deprecated now. Affected modules: utilities/links, utilities/lists, and utilities/text and their sub-modules. -* You can now register callbacks for compilation events so that you can take - custom actions when they occur. For instance, you might want to notify - Growl when a stylesheet compilation error occurs. +* There is a new typography module: [Vertical Rhythm](/reference/compass/typography/vertical_rhythm/). + This makes it easier to align the typography of your page to a common rhythm. + +### Compass Utilities + +* A new mixin `reset-float` is available in the [float module](/reference/compass/utilities/general/float/#mixin-reset-float) that makes it easier to reset the floats introduced from that module. * A new mixin `reset-float` is available in the [float module](/reference/compass/utilities/general/float/#mixin-reset-float) that makes it easier to reset the floats introduced from that module. -* Reset mixins have been updated based on [Eric Meyer's CSS Reset v2.0](http://meyerweb.com/eric/tools/css/reset/index.html). HTML5 support is included by default. - For the legacy projects, you can adjust your imports to reference the the [legacy reset](/reference/compass/reset/) or [legacy reset utilities](/reference/compass/reset/utilities/). * A new module has been added to create readable text against an arbitrary background color based on the lightness of the background: [compass/utilities/color/contrast](/reference/compass/utilities/color/contrast/). * The comma-delimited-list has been renamed to delimited-list and generalized to accept a delimiter which defaults to a comma. The old function continues to exist, but is deprecated. -* A new CSS3 mixin for [appearance](/reference/compass/css3/appearance/) was added. + +### Compass Internals + +* You can now register callbacks for compilation events so that you can take + custom actions when they occur. For instance, you might want to notify + Growl when a stylesheet compilation error occurs. +* Bug fixes & performance improvements. 0.11.beta.2 (02/01/2011) ------------------------ From 5a2ea40024daefda5295e85ffc03fb8434e4d841 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Tue, 15 Mar 2011 17:10:15 -0700 Subject: [PATCH 5/5] Version bump --- VERSION.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION.yml b/VERSION.yml index 669feaac..08c2e2e2 100644 --- a/VERSION.yml +++ b/VERSION.yml @@ -2,4 +2,4 @@ :major: 0 :minor: 11 :state: beta -:build: 2 +:build: 3