From 9a0b2f5bcd21d71bce2956054ce4fccf3663249d Mon Sep 17 00:00:00 2001 From: Cody Robbins Date: Fri, 5 Feb 2010 13:49:35 -0800 Subject: [PATCH 01/48] [Compass Core] Support :first-child and :last-child pseudo selectors for +horizontal-list. --- .../compass/utilities/lists/_horizontal_list.sass | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frameworks/compass/stylesheets/compass/utilities/lists/_horizontal_list.sass b/frameworks/compass/stylesheets/compass/utilities/lists/_horizontal_list.sass index 8c601d6c..04205ef0 100644 --- a/frameworks/compass/stylesheets/compass/utilities/lists/_horizontal_list.sass +++ b/frameworks/compass/stylesheets/compass/utilities/lists/_horizontal_list.sass @@ -30,6 +30,10 @@ //** Can be mixed into any li selector that is meant to participate in a horizontal layout. Used to implement +horizontal-list. + + :last-child is not fully supported + see http://www.quirksmode.org/css/contents.html#t29 for the support matrix + =horizontal-list-item(!padding = 4px) +no-bullet white-space: nowrap @@ -37,9 +41,9 @@ padding: left= !padding right= !padding - &.first + &:first-child, &.first padding-left: 0px - &.last + &:last-child, &.last padding-right: 0px //** From c4c9be0256bf84d0d58323d93ee00f36d2a7d0fd Mon Sep 17 00:00:00 2001 From: Christoffer Eliesen Date: Fri, 27 Nov 2009 13:20:47 +0100 Subject: [PATCH 02/48] Take margins into account in liquid grid. The previous version of liquid grid would not take margins into proper account. With this patch the margins are a correct percentage of the container, and adding multiple margins / columns together should add up to just about 100% (not entirely accurate, but very close). The math is as follows: With the previous version, you get these numbers: 4.173% grid width * 24 columns = 100.152%, which due to rounding 'fixes' in the template becomes exactly 100%. However, this is without any margins. Once you add margins, you exceed 100%, rendering margins unusable. To add to the confusion, the margins are not a percentage of the width, but instead in 'em' units, making it very difficult to keep the entire grid from getting beyond 100% in width once you add margins. With this patch, you get these numbers: (3.167% grid width + 1.042% margin) * 24 columns = 101.1016%. Since you don't use any margin for the last column, you subtract one margin and end up with 99.974%. Optimally this number would be 100.000%, but the 0.026% error is difficult to remove, and an acceptable compromise in my opinion. In summary, this patch enables margins to be used with the liquid grid, which is the expected behaviour. --- .../stylesheets/blueprint/_liquid.sass | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/frameworks/blueprint/stylesheets/blueprint/_liquid.sass b/frameworks/blueprint/stylesheets/blueprint/_liquid.sass index 0e41d32e..43bffeb1 100644 --- a/frameworks/blueprint/stylesheets/blueprint/_liquid.sass +++ b/frameworks/blueprint/stylesheets/blueprint/_liquid.sass @@ -36,13 +36,13 @@ // Main layout grid, override these constants to build your grid and container sizes. // The width shown gives the right floored percentage values. !blueprint_liquid_grid_columns ||= 24 -!blueprint_liquid_grid_width ||= 4.173% -!blueprint_liquid_grid_margin ||= 0.833em +!blueprint_liquid_grid_width ||= 3.167% +!blueprint_liquid_grid_margin ||= 1.042% // Do not edit below this line unless you really know what you're doing. !blueprint_liquid_container_width = 80% !blueprint_liquid_container_min_width = 950px -!blueprint_liquid_grid_push_pull = -(!blueprint_liquid_grid_margin * 4) +!blueprint_liquid_grid_push_pull = -(!blueprint_liquid_grid_margin + !blueprint_liquid_grid_width) =blueprint-liquid-grid // A container should group all your columns @@ -82,7 +82,7 @@ +clearfix =span(!n, !override = false) - !width = (!blueprint_liquid_grid_width * !n) - ((!blueprint_liquid_grid_width * !n) % 1) + !width = (!blueprint_liquid_grid_width * !n) + (!blueprint_liquid_grid_margin * (!n - 1)) @if !override width= !width !important @else @@ -101,10 +101,10 @@ margin-right= !blueprint_liquid_grid_margin =append(!n) - padding-right= (!blueprint_liquid_grid_width * !n) - ((!blueprint_liquid_grid_width * !n) % 1) + padding-right= (!blueprint_liquid_grid_width + !blueprint_liquid_grid_margin) * !n =prepend(!n) - padding-left= (!blueprint_liquid_grid_width * !n) - ((!blueprint_liquid_grid_width * !n) % 1) + padding-left= (!blueprint_liquid_grid_width + !blueprint_liquid_grid_margin) * !n =pull(!n, !last = false) margin-left= (!blueprint_liquid_grid_push_pull * !n) @@ -113,7 +113,7 @@ +float-right margin: top: 0 - left: 1.5em + left= !blueprint_liquid_grid_margin right= (!blueprint_liquid_grid_push_pull * !n) bottom: 0 @@ -121,8 +121,8 @@ border-right: 1px solid #eee =colborder - padding-right: 2% - margin-right: 2% + padding-right= !blueprint_liquid_grid_margin * 2 + margin-right= !blueprint_liquid_grid_margin * 2 +border =colruler @@ -131,7 +131,9 @@ clear: both width: 100% height: 0.083em - margin: 0 0 1.583em + margin: 0 + margin-left= !blueprint_liquid_grid_margin * 2 + margin-right= !blueprint_liquid_grid_margin * 2 border: none =colspacer From fc19d5e036158fbac0c0b8523946b62f5800745c Mon Sep 17 00:00:00 2001 From: Daniel Hofstetter Date: Thu, 11 Feb 2010 15:29:42 +0100 Subject: [PATCH 03/48] Fixing typo (replacing "WARINING" with "WARNING") --- .../blueprint/stylesheets/blueprint/modules/_buttons.sass | 2 +- frameworks/blueprint/stylesheets/blueprint/modules/_colors.sass | 2 +- frameworks/blueprint/stylesheets/blueprint/modules/_debug.sass | 2 +- .../blueprint/stylesheets/blueprint/modules/_fancy_type.sass | 2 +- frameworks/blueprint/stylesheets/blueprint/modules/_form.sass | 2 +- frameworks/blueprint/stylesheets/blueprint/modules/_grid.sass | 2 +- .../blueprint/stylesheets/blueprint/modules/_interaction.sass | 2 +- .../blueprint/stylesheets/blueprint/modules/_link_icons.sass | 2 +- frameworks/blueprint/stylesheets/blueprint/modules/_liquid.sass | 2 +- frameworks/blueprint/stylesheets/blueprint/modules/_reset.sass | 2 +- frameworks/blueprint/stylesheets/blueprint/modules/_rtl.sass | 2 +- .../blueprint/stylesheets/blueprint/modules/_scaffolding.sass | 2 +- .../blueprint/stylesheets/blueprint/modules/_typography.sass | 2 +- .../blueprint/stylesheets/blueprint/modules/_utilities.sass | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/frameworks/blueprint/stylesheets/blueprint/modules/_buttons.sass b/frameworks/blueprint/stylesheets/blueprint/modules/_buttons.sass index 04cd2ea3..d46ec44a 100644 --- a/frameworks/blueprint/stylesheets/blueprint/modules/_buttons.sass +++ b/frameworks/blueprint/stylesheets/blueprint/modules/_buttons.sass @@ -1,2 +1,2 @@ -@debug "DEPRECATION WARINING: blueprint/modules/buttons.sass has moved to blueprint/buttons.sass" +@debug "DEPRECATION WARNING: blueprint/modules/buttons.sass has moved to blueprint/buttons.sass" @import blueprint/buttons.sass diff --git a/frameworks/blueprint/stylesheets/blueprint/modules/_colors.sass b/frameworks/blueprint/stylesheets/blueprint/modules/_colors.sass index 5dd98c92..45575213 100644 --- a/frameworks/blueprint/stylesheets/blueprint/modules/_colors.sass +++ b/frameworks/blueprint/stylesheets/blueprint/modules/_colors.sass @@ -1,2 +1,2 @@ -@debug "DEPRECATION WARINING: blueprint/modules/colors.sass has moved to blueprint/colors.sass" +@debug "DEPRECATION WARNING: blueprint/modules/colors.sass has moved to blueprint/colors.sass" @import blueprint/colors.sass diff --git a/frameworks/blueprint/stylesheets/blueprint/modules/_debug.sass b/frameworks/blueprint/stylesheets/blueprint/modules/_debug.sass index a78c6e98..b87bb954 100644 --- a/frameworks/blueprint/stylesheets/blueprint/modules/_debug.sass +++ b/frameworks/blueprint/stylesheets/blueprint/modules/_debug.sass @@ -1,2 +1,2 @@ -@debug "DEPRECATION WARINING: blueprint/modules/debug.sass has moved to blueprint/debug.sass" +@debug "DEPRECATION WARNING: blueprint/modules/debug.sass has moved to blueprint/debug.sass" @import blueprint/debug.sass diff --git a/frameworks/blueprint/stylesheets/blueprint/modules/_fancy_type.sass b/frameworks/blueprint/stylesheets/blueprint/modules/_fancy_type.sass index 5a43f5f9..6d378738 100644 --- a/frameworks/blueprint/stylesheets/blueprint/modules/_fancy_type.sass +++ b/frameworks/blueprint/stylesheets/blueprint/modules/_fancy_type.sass @@ -1,2 +1,2 @@ -@debug "DEPRECATION WARINING: blueprint/modules/fancy_type.sass has moved to blueprint/fancy_type.sass" +@debug "DEPRECATION WARNING: blueprint/modules/fancy_type.sass has moved to blueprint/fancy_type.sass" @import blueprint/fancy_type.sass diff --git a/frameworks/blueprint/stylesheets/blueprint/modules/_form.sass b/frameworks/blueprint/stylesheets/blueprint/modules/_form.sass index 7b455c81..b37d6776 100644 --- a/frameworks/blueprint/stylesheets/blueprint/modules/_form.sass +++ b/frameworks/blueprint/stylesheets/blueprint/modules/_form.sass @@ -1,2 +1,2 @@ -@debug "DEPRECATION WARINING: blueprint/modules/form.sass has moved to blueprint/form.sass" +@debug "DEPRECATION WARNING: blueprint/modules/form.sass has moved to blueprint/form.sass" @import blueprint/form.sass diff --git a/frameworks/blueprint/stylesheets/blueprint/modules/_grid.sass b/frameworks/blueprint/stylesheets/blueprint/modules/_grid.sass index fd72b845..66a1dd16 100644 --- a/frameworks/blueprint/stylesheets/blueprint/modules/_grid.sass +++ b/frameworks/blueprint/stylesheets/blueprint/modules/_grid.sass @@ -1,2 +1,2 @@ -@debug "DEPRECATION WARINING: blueprint/modules/grid.sass has moved to blueprint/grid.sass" +@debug "DEPRECATION WARNING: blueprint/modules/grid.sass has moved to blueprint/grid.sass" @import blueprint/grid.sass diff --git a/frameworks/blueprint/stylesheets/blueprint/modules/_interaction.sass b/frameworks/blueprint/stylesheets/blueprint/modules/_interaction.sass index 9b2ba76b..0af84e21 100644 --- a/frameworks/blueprint/stylesheets/blueprint/modules/_interaction.sass +++ b/frameworks/blueprint/stylesheets/blueprint/modules/_interaction.sass @@ -1,2 +1,2 @@ -@debug "DEPRECATION WARINING: blueprint/modules/interaction.sass has moved to blueprint/interaction.sass" +@debug "DEPRECATION WARNING: blueprint/modules/interaction.sass has moved to blueprint/interaction.sass" @import blueprint/interaction.sass diff --git a/frameworks/blueprint/stylesheets/blueprint/modules/_link_icons.sass b/frameworks/blueprint/stylesheets/blueprint/modules/_link_icons.sass index 7b38ceba..be69a37c 100644 --- a/frameworks/blueprint/stylesheets/blueprint/modules/_link_icons.sass +++ b/frameworks/blueprint/stylesheets/blueprint/modules/_link_icons.sass @@ -1,2 +1,2 @@ -@debug "DEPRECATION WARINING: blueprint/modules/link_icons.sass has moved to blueprint/link_icons.sass" +@debug "DEPRECATION WARNING: blueprint/modules/link_icons.sass has moved to blueprint/link_icons.sass" @import blueprint/link_icons.sass diff --git a/frameworks/blueprint/stylesheets/blueprint/modules/_liquid.sass b/frameworks/blueprint/stylesheets/blueprint/modules/_liquid.sass index eed1e601..fb2ebe8a 100644 --- a/frameworks/blueprint/stylesheets/blueprint/modules/_liquid.sass +++ b/frameworks/blueprint/stylesheets/blueprint/modules/_liquid.sass @@ -1,3 +1,3 @@ -@debug "DEPRECATION WARINING: blueprint/modules/liquid.sass has moved to blueprint/liquid.sass" +@debug "DEPRECATION WARNING: blueprint/modules/liquid.sass has moved to blueprint/liquid.sass" @import blueprint/liquid.sass diff --git a/frameworks/blueprint/stylesheets/blueprint/modules/_reset.sass b/frameworks/blueprint/stylesheets/blueprint/modules/_reset.sass index 297ea8b4..229d432b 100644 --- a/frameworks/blueprint/stylesheets/blueprint/modules/_reset.sass +++ b/frameworks/blueprint/stylesheets/blueprint/modules/_reset.sass @@ -1,2 +1,2 @@ -@debug "DEPRECATION WARINING: blueprint/modules/reset.sass has moved to blueprint/reset.sass" +@debug "DEPRECATION WARNING: blueprint/modules/reset.sass has moved to blueprint/reset.sass" @import blueprint/reset.sass diff --git a/frameworks/blueprint/stylesheets/blueprint/modules/_rtl.sass b/frameworks/blueprint/stylesheets/blueprint/modules/_rtl.sass index 8cd4d0d8..36a29470 100644 --- a/frameworks/blueprint/stylesheets/blueprint/modules/_rtl.sass +++ b/frameworks/blueprint/stylesheets/blueprint/modules/_rtl.sass @@ -1,2 +1,2 @@ -@debug "DEPRECATION WARINING: blueprint/modules/rtl.sass has moved to blueprint/rtl.sass" +@debug "DEPRECATION WARNING: blueprint/modules/rtl.sass has moved to blueprint/rtl.sass" @import blueprint/rtl.sass diff --git a/frameworks/blueprint/stylesheets/blueprint/modules/_scaffolding.sass b/frameworks/blueprint/stylesheets/blueprint/modules/_scaffolding.sass index a68b8886..9082f4cf 100644 --- a/frameworks/blueprint/stylesheets/blueprint/modules/_scaffolding.sass +++ b/frameworks/blueprint/stylesheets/blueprint/modules/_scaffolding.sass @@ -1,2 +1,2 @@ -@debug "DEPRECATION WARINING: blueprint/modules/scaffolding.sass has moved to blueprint/scaffolding.sass" +@debug "DEPRECATION WARNING: blueprint/modules/scaffolding.sass has moved to blueprint/scaffolding.sass" @import blueprint/scaffolding.sass diff --git a/frameworks/blueprint/stylesheets/blueprint/modules/_typography.sass b/frameworks/blueprint/stylesheets/blueprint/modules/_typography.sass index d2f1a943..155c30af 100644 --- a/frameworks/blueprint/stylesheets/blueprint/modules/_typography.sass +++ b/frameworks/blueprint/stylesheets/blueprint/modules/_typography.sass @@ -1,2 +1,2 @@ -@debug "DEPRECATION WARINING: blueprint/modules/typography.sass has moved to blueprint/typography.sass" +@debug "DEPRECATION WARNING: blueprint/modules/typography.sass has moved to blueprint/typography.sass" @import blueprint/typography.sass diff --git a/frameworks/blueprint/stylesheets/blueprint/modules/_utilities.sass b/frameworks/blueprint/stylesheets/blueprint/modules/_utilities.sass index 57994368..3695d191 100644 --- a/frameworks/blueprint/stylesheets/blueprint/modules/_utilities.sass +++ b/frameworks/blueprint/stylesheets/blueprint/modules/_utilities.sass @@ -1,2 +1,2 @@ -@debug "DEPRECATION WARINING: blueprint/modules/utilities.sass has moved to blueprint/utilities.sass" +@debug "DEPRECATION WARNING: blueprint/modules/utilities.sass has moved to blueprint/utilities.sass" @import blueprint/utilities.sass From bb77dcefcb14a31e9853061e70c1c16508e18be2 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Sat, 13 Feb 2010 11:40:02 -0800 Subject: [PATCH 04/48] Default the project directory to the current directory. --- lib/compass/configuration/defaults.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/compass/configuration/defaults.rb b/lib/compass/configuration/defaults.rb index dadc0f39..483276da 100644 --- a/lib/compass/configuration/defaults.rb +++ b/lib/compass/configuration/defaults.rb @@ -2,6 +2,10 @@ module Compass module Configuration module Defaults + def default_project_path + "." + end + def default_project_type :stand_alone end From 6878899c4ca0297da54b46e2ae100da2179fd6c1 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Sat, 13 Feb 2010 11:40:59 -0800 Subject: [PATCH 05/48] [Command Line] Don't force the user to specify the configuration path when calling compass config --- lib/compass/commands/write_configuration.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/compass/commands/write_configuration.rb b/lib/compass/commands/write_configuration.rb index acf60301..bc7d6988 100644 --- a/lib/compass/commands/write_configuration.rb +++ b/lib/compass/commands/write_configuration.rb @@ -59,8 +59,11 @@ module Compass end end else - directory File.dirname(options[:configuration_file]) - installer.write_configuration_files(options[:configuration_file]) + config_file = options[:configuration_file] + config_file ||= Compass.detect_configuration_file + config_file ||= Compass::Configuration::Helpers::KNOWN_CONFIG_LOCATIONS.first + directory File.dirname(config_file) + installer.write_configuration_files(config_file) end end From d59451f39830b27c2ed5e82c8436726a96fcc2c2 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Sat, 13 Feb 2010 12:22:21 -0800 Subject: [PATCH 06/48] [Rails] Don't set unset options on the Sass::Plugin --- lib/compass/configuration/adapters.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/compass/configuration/adapters.rb b/lib/compass/configuration/adapters.rb index 01929daf..98fb8be4 100644 --- a/lib/compass/configuration/adapters.rb +++ b/lib/compass/configuration/adapters.rb @@ -19,8 +19,8 @@ module Compass plugin_opts = {:template_location => locations} plugin_opts[:style] = output_style if output_style plugin_opts[:line_comments] = line_comments - plugin_opts[:cache] = cache - plugin_opts[:cache_location] = cache_path + plugin_opts[:cache] = cache unless cache.nil? + plugin_opts[:cache_location] = cache_path unless cache_path.nil? plugin_opts.merge!(sass_options || {}) plugin_opts end From c1b903024f18ea620953c28668fbca5d972919c0 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Sat, 13 Feb 2010 16:56:53 -0800 Subject: [PATCH 07/48] New APIs for dealing with configuration changes and accessing a compiler instance. --- lib/compass.rb | 2 +- lib/compass/compiler.rb | 7 +++++++ lib/compass/configuration/adapters.rb | 2 +- lib/compass/configuration/helpers.rb | 9 +++++++++ 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/lib/compass.rb b/lib/compass.rb index aeae12dd..3566fb94 100644 --- a/lib/compass.rb +++ b/lib/compass.rb @@ -17,6 +17,6 @@ module Compass module_function :base_directory, :lib_directory end -%w(configuration frameworks app_integration).each do |lib| +%w(configuration frameworks app_integration actions compiler).each do |lib| require "compass/#{lib}" end diff --git a/lib/compass/compiler.rb b/lib/compass/compiler.rb index 2c626439..ed33b808 100644 --- a/lib/compass/compiler.rb +++ b/lib/compass/compiler.rb @@ -58,6 +58,13 @@ module Compass nil end + def clean! + FileUtils.rm_rf options[:cache_location] + css_files.each do |css_file| + FileUtils.rm_f css_file + end + end + def run if new_config? # Wipe out the cache and force compilation if the configuration has changed. diff --git a/lib/compass/configuration/adapters.rb b/lib/compass/configuration/adapters.rb index 98fb8be4..0be86dc3 100644 --- a/lib/compass/configuration/adapters.rb +++ b/lib/compass/configuration/adapters.rb @@ -3,7 +3,7 @@ module Compass # The adapters module provides methods that make configuration data from a compass project # adapt to various consumers of configuration data module Adapters - def to_compiler_arguments(additional_options) + def to_compiler_arguments(additional_options = {}) [project_path, sass_path, css_path, to_sass_engine_options.merge(additional_options)] end diff --git a/lib/compass/configuration/helpers.rb b/lib/compass/configuration/helpers.rb index d1d983bb..643523fa 100644 --- a/lib/compass/configuration/helpers.rb +++ b/lib/compass/configuration/helpers.rb @@ -112,6 +112,15 @@ module Compass possible_files.detect{|f| File.exists?(f)} end + def handle_configuration_change! + if (compiler = Compass.compiler).new_config? + compiler.clean! + end + end + + def compiler + Compass::Compiler.new(*Compass.configuration.to_compiler_arguments) + end end end From 8172fce22a58ccc523f3a789b99e5bbed49da11e Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Sat, 13 Feb 2010 17:07:34 -0800 Subject: [PATCH 08/48] [Rails] Fix a setup bug and handle compass configuration changes at rails boot. Existing rails projects should change their compass initializer file to: require 'compass' rails_root = (defined?(Rails) ? Rails.root : RAILS_ROOT).to_s Compass.add_project_configuration(File.join(rails_root, "config", "compass.rb")) Compass.configure_sass_plugin! Compass.handle_configuration_change! --- lib/compass/app_integration/rails.rb | 6 ++++++ lib/compass/app_integration/rails/installer.rb | 13 ++++++++----- lib/compass/configuration/inheritance.rb | 8 ++++++-- lib/compass/configuration/serialization.rb | 2 +- 4 files changed, 21 insertions(+), 8 deletions(-) diff --git a/lib/compass/app_integration/rails.rb b/lib/compass/app_integration/rails.rb index 668fbd42..0e5c6a84 100644 --- a/lib/compass/app_integration/rails.rb +++ b/lib/compass/app_integration/rails.rb @@ -20,6 +20,12 @@ module Compass extend(ConfigurationDefaults) end + def env + if rails_env = (defined?(::Rails) ? ::Rails.env : (defined?(RAILS_ENV) ? RAILS_ENV : nil)) + rails_env.production? ? :production : :development + end + end + end end end diff --git a/lib/compass/app_integration/rails/installer.rb b/lib/compass/app_integration/rails/installer.rb index a81e2469..41072844 100644 --- a/lib/compass/app_integration/rails/installer.rb +++ b/lib/compass/app_integration/rails/installer.rb @@ -80,9 +80,12 @@ module Compass end def config_contents + "# This configuration file works with both the Compass command line tool and within Rails.\n" + Compass.configuration.serialize do |prop, value| if prop == :project_path "project_path = RAILS_ROOT if defined?(RAILS_ROOT)\n" + elsif prop == :environment + "environment = Compass::AppIntegration::Rails.env\n" elsif prop == :output_style "" end @@ -91,11 +94,11 @@ module Compass def initializer_contents %Q{require 'compass' - # If you have any compass plugins, require them here. - Compass.configuration.parse(File.join(RAILS_ROOT, "config", "compass.rb")) - Compass.configuration.environment = (defined?(Rails) ? Rails.env : RAILS_ENV).to_sym - Compass.configure_sass_plugin! - } + |rails_root = (defined?(Rails) ? Rails.root : RAILS_ROOT).to_s + |Compass.add_project_configuration(File.join(rails_root, "config", "compass.rb")) + |Compass.configure_sass_plugin! + |Compass.handle_configuration_change! + |}.gsub(/^\s+\|/,'') end def stylesheet_prefix diff --git a/lib/compass/configuration/inheritance.rb b/lib/compass/configuration/inheritance.rb index 255749c2..18884d3d 100644 --- a/lib/compass/configuration/inheritance.rb +++ b/lib/compass/configuration/inheritance.rb @@ -145,13 +145,17 @@ module Compass end end - def debug + def chain instances = [self] instances << instances.last.inherited_data while instances.last.inherited_data + instances + end + + def debug normalized_attrs = {} ATTRIBUTES.each do |prop| values = [] - instances.each do |instance| + chain.each do |instance| values << { :raw => (instance.send("raw_#{prop}") rescue nil), :value => (instance.send("#{prop}_without_default") rescue nil), diff --git a/lib/compass/configuration/serialization.rb b/lib/compass/configuration/serialization.rb index c4c1fb27..ade505df 100644 --- a/lib/compass/configuration/serialization.rb +++ b/lib/compass/configuration/serialization.rb @@ -73,7 +73,7 @@ module Compass def serialize_property(prop, value) %Q(#{prop} = #{value.inspect}\n) end - + def issue_deprecation_warnings if http_images_path == :relative $stderr.puts "DEPRECATION WARNING: Please set relative_assets = true to enable relative paths." From 9cca38f85dce497d81ad49d7e818b5a97537abf1 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Sat, 13 Feb 2010 17:19:57 -0800 Subject: [PATCH 09/48] Disable the parse method with a decent error message. It should only be used internally now. --- lib/compass/configuration/serialization.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/compass/configuration/serialization.rb b/lib/compass/configuration/serialization.rb index ade505df..ed93686b 100644 --- a/lib/compass/configuration/serialization.rb +++ b/lib/compass/configuration/serialization.rb @@ -10,7 +10,7 @@ module Compass module ClassMethods def new_from_file(config_file) data = Data.new(config_file) - data.parse(config_file) + data._parse(config_file) data end @@ -22,8 +22,12 @@ module Compass end module InstanceMethods - # parses a configuration file which is a ruby script def parse(config_file) + raise Compass::Error, "Compass.configuration.parse(filename) has been removed. Please call Compass.add_project_configuration(filename) instead." + end + + # parses a configuration file which is a ruby script + def _parse(config_file) unless File.readable?(config_file) raise Compass::Error, "Configuration file, #{config_file}, not found or not readable." end From 6b5ffdb0d68da79e2639cac9f2323d312ba4c867 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Sat, 13 Feb 2010 17:34:29 -0800 Subject: [PATCH 10/48] [Compass Core] Clear the sticky footer so that it works correctly with grid layouts. Closes GH-79. --- .../compass/stylesheets/compass/layout/_sticky_footer.sass | 1 + test/fixtures/stylesheets/compass/css/layout.css | 1 + 2 files changed, 2 insertions(+) diff --git a/frameworks/compass/stylesheets/compass/layout/_sticky_footer.sass b/frameworks/compass/stylesheets/compass/layout/_sticky_footer.sass index 7ab874ca..f6dd573f 100644 --- a/frameworks/compass/stylesheets/compass/layout/_sticky_footer.sass +++ b/frameworks/compass/stylesheets/compass/layout/_sticky_footer.sass @@ -7,6 +7,7 @@ html, body height: 100% #{!root_selector} + clear: both min-height: 100% height: auto !important height: 100% diff --git a/test/fixtures/stylesheets/compass/css/layout.css b/test/fixtures/stylesheets/compass/css/layout.css index f461c7a0..fd0af10b 100644 --- a/test/fixtures/stylesheets/compass/css/layout.css +++ b/test/fixtures/stylesheets/compass/css/layout.css @@ -2,6 +2,7 @@ html, body { height: 100%; } #layout { + clear: both; min-height: 100%; height: auto !important; height: 100%; From 3dd2a90decdba1441e2ebb31c50283b223837249 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Sat, 13 Feb 2010 17:44:49 -0800 Subject: [PATCH 11/48] [Command Line] [Windows] Disable colorized output if win32console cannot be loaded. Closes GH-82 --- lib/compass/exec.rb | 6 +++++- lib/compass/logger.rb | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/compass/exec.rb b/lib/compass/exec.rb index 664db9d4..08b15e8e 100644 --- a/lib/compass/exec.rb +++ b/lib/compass/exec.rb @@ -6,7 +6,11 @@ require 'compass/actions' require 'compass/installers' require 'compass/commands' require 'rbconfig' -require 'win32console' if RbConfig::CONFIG['host_os'] =~ /mswin|mingw/ +begin + require 'win32console' if RbConfig::CONFIG['host_os'] =~ /mswin|mingw/ +rescue LoadError + $boring = true +end module Compass::Exec end diff --git a/lib/compass/logger.rb b/lib/compass/logger.rb index c0fd5ffd..7f726689 100644 --- a/lib/compass/logger.rb +++ b/lib/compass/logger.rb @@ -46,7 +46,11 @@ module Compass def color(c) if Compass.configuration.color_output && c && COLORS.has_key?(c.to_sym) - "\e[#{COLORS[c.to_sym]}m" + if defined?($boring) && $boring + "" + else + "\e[#{COLORS[c.to_sym]}m" + end else "" end From 925938cd5e4b86c39eaa1651e1b5c918b40c366d Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Mon, 15 Feb 2010 10:57:20 -0800 Subject: [PATCH 12/48] [Extensions] Don't force an extension to register itself just because it has ruby code. --- lib/compass/frameworks.rb | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/lib/compass/frameworks.rb b/lib/compass/frameworks.rb index bfe821f8..fef3e333 100644 --- a/lib/compass/frameworks.rb +++ b/lib/compass/frameworks.rb @@ -27,11 +27,20 @@ module Compass end end + def detect_registration + @registered = nil + yield + @registered + ensure + @registered = nil + end + def register(name, *arguments) + @registered = Framework.new(name, *arguments) if idx = ALL.index(self[name]) - ALL[idx] = Framework.new(name, *arguments) + ALL[idx] = @registered else - ALL << Framework.new(name, *arguments) + ALL << @registered end end @@ -54,9 +63,10 @@ module Compass File.join(directory, File.basename(directory)+".rb") ] loader = loaders.detect{|l| File.exists?(l)} - if loader - require loader - else + registered_framework = detect_registration do + require loader if loader + end + unless registered_framework register File.basename(directory), directory end end From aef52bd57e1a8ecc33a56ff4a74adb205658cd2f Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Tue, 16 Feb 2010 01:47:27 -0800 Subject: [PATCH 13/48] New linear gradient mixin and support functions. Radial gradient and browser testing are still pending. --- .../stylesheets/compass/css3/_gradient.sass | 54 ++++---- lib/compass/sass_extensions/functions.rb | 4 +- .../sass_extensions/functions/color_stop.rb | 10 -- .../functions/gradient_support.rb | 123 ++++++++++++++++++ test/compass_test.rb | 2 +- .../stylesheets/compass/css/gradients.css | 43 ++++++ .../stylesheets/compass/sass/gradients.sass | 24 ++++ 7 files changed, 222 insertions(+), 38 deletions(-) delete mode 100644 lib/compass/sass_extensions/functions/color_stop.rb create mode 100644 lib/compass/sass_extensions/functions/gradient_support.rb create mode 100644 test/fixtures/stylesheets/compass/css/gradients.css create mode 100644 test/fixtures/stylesheets/compass/sass/gradients.sass diff --git a/frameworks/compass/stylesheets/compass/css3/_gradient.sass b/frameworks/compass/stylesheets/compass/css3/_gradient.sass index d67d863a..526f2bc0 100644 --- a/frameworks/compass/stylesheets/compass/css3/_gradient.sass +++ b/frameworks/compass/stylesheets/compass/css3/_gradient.sass @@ -6,35 +6,39 @@ background: -moz-#{!type}-gradient(#{!gradient}) //* - // This will yeild a radial gradient with an apparent specular highlight + // This will yield a radial gradient with an apparent specular highlight +radial-gradient("45 45, 10, 52 50, 30", Cyan, DodgerBlue) =radial-gradient(!coords, !color1, !color2, !color_stop = false) +gradient("radial", !coords, !color1, !color2, !color_stop) //* - // This yields a linear gradient spanning from !start to !end coordinates - +linear-gradient("left top", "left bottom", #fff, #ddd) - -=linear-gradient(!start, !end, !color1, !color2, !color_stop = false) - !coords = !start + ", " + !end - +gradient("linear", !coords, !color1, !color2, !color_stop) - -//* - // This yields a gradient starting at the top with #fff, ending in #aaa - +v-gradient(#fff, #aaa) - // Same as above but with a #ccc at the halfway point - +v-gradient(#fff, #aaa, color_stop(50%, #ccc)) - // Same as the first example but with #ccc at the 30% from the top, and #bbb at 70% from the top - +v-gradient(#fff, #aaa, color_stop(30%, #ccc, 70%, #bbb)) - -=v-gradient(!color1, !color2, !color_stop = false) - +linear-gradient("left top", "left bottom", !color1, !color2, !color_stop) - -//* - // This yields a horizontal linear gradient spanning from left to right - // It can be used just like v-gradient above - h-gradient(#fff, #ddd) + // This yields a linear gradient spanning from top to bottom + +linear-gradient(color_stops(white, black)) -=h-gradient(!color1, !color2, !color_stop = false) - +linear-gradient("left top", "right top", !color1, !color2, !color_stop) \ No newline at end of file + // This yields a linear gradient spanning from bottom to top + +linear-gradient(color_stops(white, black), "bottom") + + // This yields a linear gradient spanning from left to right + +linear-gradient(color_stops(white, black), "left") + + // This yields a linear gradient starting at white passing + // thru blue at 33% down and then to black + +linear-gradient(color_stops(white, blue 33%, black)) + + // This yields a linear gradient starting at white passing + // thru blue at 33% down and then to black at 67% until the end + +linear-gradient(color_stops(white, blue 33%, black 67%)) + +=linear-gradient(!color_stops, !start = "top") + // Firefox's gradient api is nice. + // Webkit's gradient api sucks -- hence these backflips: + !end = grad_opposite_position(!start) + !start_color = grad_start_color(!color_stops) + !end_color = grad_end_color(!color_stops) + !webkit_stops = grad_color_stops(!color_stops) + !gradient= "#{grad_point(!start)}, #{grad_point(!end)}, from(#{!start_color}), to(#{!end_color})" + @if !webkit_stops + !gradient= !gradient + ", " + !webkit_stops + background-image: -webkit-gradient(linear, #{!gradient}) + background-image: -moz-linear-gradient(#{!start}, #{!color_stops}) diff --git a/lib/compass/sass_extensions/functions.rb b/lib/compass/sass_extensions/functions.rb index c33a3012..0c9fa2e8 100644 --- a/lib/compass/sass_extensions/functions.rb +++ b/lib/compass/sass_extensions/functions.rb @@ -1,7 +1,7 @@ module Compass::SassExtensions::Functions end -%w(selectors enumerate urls display inline_image color_stop font_files).each do |func| +%w(selectors enumerate urls display inline_image gradient_support font_files).each do |func| require "compass/sass_extensions/functions/#{func}" end @@ -11,7 +11,7 @@ module Sass::Script::Functions include Compass::SassExtensions::Functions::Urls include Compass::SassExtensions::Functions::Display include Compass::SassExtensions::Functions::InlineImage - include Compass::SassExtensions::Functions::ColorStop + include Compass::SassExtensions::Functions::GradientSupport::Functions include Compass::SassExtensions::Functions::FontFiles end diff --git a/lib/compass/sass_extensions/functions/color_stop.rb b/lib/compass/sass_extensions/functions/color_stop.rb deleted file mode 100644 index a0902dfe..00000000 --- a/lib/compass/sass_extensions/functions/color_stop.rb +++ /dev/null @@ -1,10 +0,0 @@ -module Compass::SassExtensions::Functions::ColorStop - def color_stop(*args) - raise Sass::SyntaxError, "An even number of arguments must be passed to color-stop()" unless args.size % 2 == 0 - stops = [] - while args.size > 0 - stops << "color-stop(#{args.shift}, #{args.shift})" - end - Sass::Script::String.new(stops.join(", ")) - end -end diff --git a/lib/compass/sass_extensions/functions/gradient_support.rb b/lib/compass/sass_extensions/functions/gradient_support.rb new file mode 100644 index 00000000..71287d82 --- /dev/null +++ b/lib/compass/sass_extensions/functions/gradient_support.rb @@ -0,0 +1,123 @@ +module Compass::SassExtensions::Functions::GradientSupport + + class List < Sass::Script::Literal + attr_accessor :values + def initialize(*values) + self.values = values + end + def inspect + to_s + end + def to_s + values.map{|v| v.to_s}.join(", ") + end + end + + class ColorStop < Sass::Script::Literal + attr_accessor :color, :stop + def initialize(color, stop = nil) + self.color, self.stop = color, stop + end + def inspect + to_s + end + def to_s + s = "#{color}" + if stop + s << " " + s << stop.times(Sass::Script::Number.new(100)).to_s + s << "%" + end + s + end + end + + module Functions + def grad_opposite_position(position) + opposite = position.value.split(/ +/).map do |pos| + case pos + when "top" then "bottom" + when "bottom" then "top" + when "left" then "right" + when "right" then "left" + else + raise Sass::SyntaxError, "Cannot determine the opposite of #{pos}" + end + end + Sass::Script::String.new(opposite.join(" ")) + end + def grad_color_stops(color_list) + positions = color_list.values.map{|c| [c.stop && c.stop.value, c.color]} + # fill in the blank positions + positions[0][0] = 0 unless positions.first.first + positions[positions.size - 1][0] = 1 unless positions.last.first + for i in 0...positions.size + if positions[i].first.nil? + num = 2.0 + for j in (i+1)...positions.size + if positions[j].first + positions[i][0] = positions[i-1].first + (positions[j].first - positions[i-1].first) / num + break + else + num += 1 + end + end + end + end + positions = positions[1..-1] if positions.first.first == 0.0 + positions = positions[0..-2] if positions.last.first == 1.0 + if positions.empty? + # We return false here since sass has no nil. + Sass::Script::Bool.new(false) + else + color_stops = positions.map {|pos| "color-stop(#{Sass::Script::Number.new((pos.first*10000).round/100.0).to_s}%, #{pos.last})"} + Sass::Script::String.new(color_stops.join(", ")) + end + end + def grad_start_color(color_list) + color_list.values.first.color + end + def grad_end_color(color_list) + color_list.values.last.color + end + def grad_point(position) + position = position.value + position = if position[" "] + position + else + case position + when /top|bottom/ + "#{position} left" + when /left|right/ + "top #{position}" + end + end + Sass::Script::String.new position.gsub(/top/, "0%").gsub(/bottom/, "100%").gsub(/left/,"0%").gsub(/right/,"100%") + end + def color_stops(*args) + List.new(*args.map do |arg| + case arg + when Sass::Script::Color + ColorStop.new(arg) + when Sass::Script::String + color, stop = arg.value.split(/ +/, 2) + color = Sass::Script::Parser.parse(color, 0, 0) + if stop =~ /^(\d+)?(?:\.(\d+))?(%)?$/ + integral, decimal, percent = $1, $2, $3 + number = "#{integral || 0}.#{decimal || 0}".to_f + number = number / 100 if percent + if number > 1 + raise Sass::SyntaxError, "A color stop location must be between 0#{"%" if percent} and 1#{"00%" if percent}. Got: #{stop}" + end + stop = Sass::Script::Number.new(number) + elsif !stop.nil? + raise Sass::SyntaxError, "A color stop location must be between 0 and 1 or 0% and 100%. Got: #{stop}" + end + ColorStop.new(color, stop) + else + raise Sass::SyntaxError, "Not a valid color stop: #{arg}" + end + end) + end + end +end diff --git a/test/compass_test.rb b/test/compass_test.rb index aff2388a..d0e43f23 100644 --- a/test/compass_test.rb +++ b/test/compass_test.rb @@ -42,7 +42,7 @@ class CompassTest < Test::Unit::TestCase each_css_file(proj.css_path) do |css_file| assert_no_errors css_file, 'compass' end - assert_renders_correctly :reset, :layout, :utilities + assert_renders_correctly :reset, :layout, :utilities, :gradients end end diff --git a/test/fixtures/stylesheets/compass/css/gradients.css b/test/fixtures/stylesheets/compass/css/gradients.css new file mode 100644 index 00000000..93f0acf6 --- /dev/null +++ b/test/fixtures/stylesheets/compass/css/gradients.css @@ -0,0 +1,43 @@ +.linear-1 { + background-image: -webkit-gradient(linear, 0% 0%, 100% 0%, from(#dddddd), to(#aaaaaa)); + background-image: -moz-linear-gradient(top, #dddddd, #aaaaaa); } + +.linear-2 { + background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#dddddd), to(#aaaaaa)); + background-image: -moz-linear-gradient(left, #dddddd, #aaaaaa); } + +.linear-3 { + background-image: -webkit-gradient(linear, 0% 0%, 100% 100%, from(#dddddd), to(#aaaaaa)); + background-image: -moz-linear-gradient(top left, #dddddd, #aaaaaa); } + +.linear-4 { + background-image: -webkit-gradient(linear, 0% 100%, 100% 0%, from(#dddddd), to(#aaaaaa)); + background-image: -moz-linear-gradient(top right, #dddddd, #aaaaaa); } + +.linear-5 { + background-image: -webkit-gradient(linear, 0% 0%, 100% 0%, from(#dddddd), to(#aaaaaa), color-stop(50%, #cccccc)); + background-image: -moz-linear-gradient(top, #dddddd, #cccccc, #aaaaaa); } + +.linear-6 { + background-image: -webkit-gradient(linear, 0% 0%, 100% 0%, from(#dddddd), to(#aaaaaa), color-stop(20%, #cccccc)); + background-image: -moz-linear-gradient(top, #dddddd, #cccccc 20%, #aaaaaa); } + +.linear-7 { + background-image: -webkit-gradient(linear, 0% 0%, 100% 0%, from(#dddddd), to(#aaaaaa), color-stop(20%, #cccccc), color-stop(60%, #eeeeee)); + background-image: -moz-linear-gradient(top, #dddddd, #cccccc 20%, #eeeeee, #aaaaaa); } + +.linear-8 { + background-image: -webkit-gradient(linear, 0% 0%, 100% 0%, from(#dddddd), to(#aaaaaa), color-stop(80%, #dddddd)); + background-image: -moz-linear-gradient(top, #dddddd 80%, #aaaaaa); } + +.linear-9 { + background-image: -webkit-gradient(linear, 0% 0%, 100% 0%, from(#dddddd), to(#aaaaaa), color-stop(20%, #aaaaaa)); + background-image: -moz-linear-gradient(top, #dddddd, #aaaaaa 20%); } + +.linear-10 { + background-image: -webkit-gradient(linear, 0% 0%, 100% 0%, from(#dddddd), to(#aaaaaa), color-stop(40%, #dddddd), color-stop(50%, #aaaaaa)); + background-image: -moz-linear-gradient(top, #dddddd 40%, #aaaaaa 50%); } + +.linear-11 { + background-image: -webkit-gradient(linear, 0% 0%, 100% 0%, from(#dddddd), to(#aaaaaa), color-stop(40%, #dddddd), color-stop(45%, black), color-stop(50%, #aaaaaa)); + background-image: -moz-linear-gradient(top, #dddddd 40%, black, #aaaaaa 50%); } diff --git a/test/fixtures/stylesheets/compass/sass/gradients.sass b/test/fixtures/stylesheets/compass/sass/gradients.sass new file mode 100644 index 00000000..1f729437 --- /dev/null +++ b/test/fixtures/stylesheets/compass/sass/gradients.sass @@ -0,0 +1,24 @@ +@import compass/css3.sass + +.linear-1 + +linear-gradient(color_stops(#ddd, #aaa)) +.linear-2 + +linear-gradient(color_stops(#ddd, #aaa), "left") +.linear-3 + +linear-gradient(color_stops(#ddd, #aaa), "top left") +.linear-4 + +linear-gradient(color_stops(#ddd, #aaa), "top right") +.linear-5 + +linear-gradient(color_stops(#ddd, #ccc, #aaa)) +.linear-6 + +linear-gradient(color_stops(#ddd, #ccc 20%, #aaa)) +.linear-7 + +linear-gradient(color_stops(#ddd, #ccc 20%, #eee, #aaa)) +.linear-8 + +linear-gradient(color_stops(#ddd 80%, #aaa)) +.linear-9 + +linear-gradient(color_stops(#ddd, #aaa 20%)) +.linear-10 + +linear-gradient(color_stops(#ddd 40%, #aaa 50%)) +.linear-11 + +linear-gradient(color_stops(#ddd 40%, #000, #aaa 50%)) \ No newline at end of file From cee0eef6889a4699684e931b434662cdc6dd38bf Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Tue, 16 Feb 2010 22:13:07 -0800 Subject: [PATCH 14/48] better examples and some comments. --- examples/css3/index.html.haml | 26 +++++++++++++++---- examples/css3/src/fancy-fonts.sass | 2 +- examples/css3/src/gradient.sass | 2 +- examples/css3/src/main.sass | 20 +++++++------- .../functions/gradient_support.rb | 9 +++++++ 5 files changed, 43 insertions(+), 16 deletions(-) diff --git a/examples/css3/index.html.haml b/examples/css3/index.html.haml index 926429d9..e670b44b 100644 --- a/examples/css3/index.html.haml +++ b/examples/css3/index.html.haml @@ -30,21 +30,37 @@ %h2 Gradients %pre.horizontal %code<> - +h-gradient(#d92626, #2626d9) + :preserve + +linear-gradient( + color_stops(#d92626, #2626d9), + "left") %pre.vertical %code<> - +v-gradient(#d92626, #2626d9) + :preserve + +linear-gradient( + color_stops(#d92626, #2626d9)) %pre.diagonal %code< - +linear-gradient("left top", - "right bottom", - \#d92626, #2626d9) + :preserve + + + + + + +linear-gradient( + color_stops(#d92626, #2626d9), + "top left") + + + + %pre.radial %code<> +radial-gradient(
"center center, 10, center center, 100",
#d92626, #2626d9) .examples #border-radius.example %h2 Border Radius + %p This box has rounded corners .gutter #box-shadow.example %h2 Box Shadow diff --git a/examples/css3/src/fancy-fonts.sass b/examples/css3/src/fancy-fonts.sass index f6fb1962..6648f776 100644 --- a/examples/css3/src/fancy-fonts.sass +++ b/examples/css3/src/fancy-fonts.sass @@ -1,6 +1,6 @@ @import compass/css3.sass -+font-face("Angelina", font-files("angelina.ttf", 'truetype')) ++font-face("Angelina", font_files("angelina.ttf", "truetype")) h1 font-family: "Angelina" font-size: 5em diff --git a/examples/css3/src/gradient.sass b/examples/css3/src/gradient.sass index bba90ecb..f46438f9 100644 --- a/examples/css3/src/gradient.sass +++ b/examples/css3/src/gradient.sass @@ -5,6 +5,6 @@ height: 100px border: 1px solid #777 .linear - +v-gradient(#fff, #aaa, color_stop(50%, #ccc, 50%, #bbb)) + +linear-gradient(color_stops(#fff, #f00 50%, #ff0 75%, #0f0)) .radial +radial-gradient("45 45, 10, 52 50, 30", "Cyan", "DodgerBlue") diff --git a/examples/css3/src/main.sass b/examples/css3/src/main.sass index 25498754..06b8dea4 100644 --- a/examples/css3/src/main.sass +++ b/examples/css3/src/main.sass @@ -39,7 +39,7 @@ h1 content: " " .example - +v-gradient(#fff, #ccc) + +linear-gradient(color_stops(#fff, #ccc)) pre padding: 1em margin: 1em @@ -48,8 +48,8 @@ h1 font-weight: bold #background-clip pre - background: transparent #{image-url("fresh-peas.jpg")} no-repeat - border: 1em solid #{transparentize(red, .75)} + background: transparent #{image_url("fresh-peas.jpg")} no-repeat + border: 1em solid rgba(255,0,0,.25) .padding-box +background-clip("padding-box") +background-origin("padding-box") @@ -59,8 +59,9 @@ h1 #background-size pre - background: transparent #{image-url("fresh-peas.jpg")} no-repeat - border: 1em solid #{transparentize(red, .75)} + background: transparent #{image_url("fresh-peas.jpg")} no-repeat + border: 1em solid #{mix(red, white, .5)} + border: 1em solid rgba(255,0,0,.25) .top-left +background-size(50% 50%) .centered @@ -69,12 +70,13 @@ h1 #gradients .horizontal - +h-gradient(#d92626, #2626d9) + +linear-gradient(color_stops(#d92626, #2626d9), "left") .vertical - +v-gradient(#d92626, #2626d9) + +linear-gradient(color_stops(#d92626, #2626d9)) .diagonal - +linear-gradient("left top", "right bottom", #d92626, #2626d9) + +linear-gradient(color_stops(#d92626, #2626d9), "right top") .radial - +radial-gradient("center center, 10, center center, 100", #d92626, #2626d9) + +radial-gradient("center center, 10, center center, 100", #d92626, #2626d9) + background-image: -moz-radial-gradient(20px center, circle, 40px center #d92626 10px, #2626d9 100px) background-color: #2626d9 diff --git a/lib/compass/sass_extensions/functions/gradient_support.rb b/lib/compass/sass_extensions/functions/gradient_support.rb index 71287d82..75e6efbb 100644 --- a/lib/compass/sass_extensions/functions/gradient_support.rb +++ b/lib/compass/sass_extensions/functions/gradient_support.rb @@ -33,6 +33,7 @@ module Compass::SassExtensions::Functions::GradientSupport end module Functions + # returns the opposite position of a side or corner. def grad_opposite_position(position) opposite = position.value.split(/ +/).map do |pos| case pos @@ -46,6 +47,8 @@ module Compass::SassExtensions::Functions::GradientSupport end Sass::Script::String.new(opposite.join(" ")) end + + # returns color-stop() calls for use in webkit. def grad_color_stops(color_list) positions = color_list.values.map{|c| [c.stop && c.stop.value, c.color]} # fill in the blank positions @@ -74,12 +77,18 @@ module Compass::SassExtensions::Functions::GradientSupport Sass::Script::String.new(color_stops.join(", ")) end end + + # the first color from a list of color stops def grad_start_color(color_list) color_list.values.first.color end + + # the last color from a list of color stops def grad_end_color(color_list) color_list.values.last.color end + + # the given a position, return a point in percents def grad_point(position) position = position.value position = if position[" "] From a8457c99db544d8aab4071fca019e15b9bc24e4e Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Tue, 16 Feb 2010 22:14:10 -0800 Subject: [PATCH 15/48] Fix some x-browser issues in the gradient point code. --- .../sass_extensions/functions/gradient_support.rb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/compass/sass_extensions/functions/gradient_support.rb b/lib/compass/sass_extensions/functions/gradient_support.rb index 75e6efbb..764e679b 100644 --- a/lib/compass/sass_extensions/functions/gradient_support.rb +++ b/lib/compass/sass_extensions/functions/gradient_support.rb @@ -92,17 +92,22 @@ module Compass::SassExtensions::Functions::GradientSupport def grad_point(position) position = position.value position = if position[" "] - position + if position =~ /(top|bottom) (left|right)/ + "#{$2} #{$1}" + else + position + end else case position when /top|bottom/ - "#{position} left" + "left #{position}" when /left|right/ - "top #{position}" + "#{position} top" end end Sass::Script::String.new position.gsub(/top/, "0%").gsub(/bottom/, "100%").gsub(/left/,"0%").gsub(/right/,"100%") end + def color_stops(*args) List.new(*args.map do |arg| case arg From f9d75b3bcecc89cf7100111690aefbb6d0b95ef6 Mon Sep 17 00:00:00 2001 From: Deepak Jois Date: Wed, 17 Feb 2010 19:58:25 -0800 Subject: [PATCH 16/48] Adding image_height and image_width functions --- lib/compass/sass_extensions/functions.rb | 3 +- .../sass_extensions/functions/image_size.rb | 34 +++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 lib/compass/sass_extensions/functions/image_size.rb diff --git a/lib/compass/sass_extensions/functions.rb b/lib/compass/sass_extensions/functions.rb index c33a3012..a76421bb 100644 --- a/lib/compass/sass_extensions/functions.rb +++ b/lib/compass/sass_extensions/functions.rb @@ -1,7 +1,7 @@ module Compass::SassExtensions::Functions end -%w(selectors enumerate urls display inline_image color_stop font_files).each do |func| +%w(selectors enumerate urls display inline_image image_size color_stop font_files).each do |func| require "compass/sass_extensions/functions/#{func}" end @@ -11,6 +11,7 @@ module Sass::Script::Functions include Compass::SassExtensions::Functions::Urls include Compass::SassExtensions::Functions::Display include Compass::SassExtensions::Functions::InlineImage + include Compass::SassExtensions::Functions::ImageSize include Compass::SassExtensions::Functions::ColorStop include Compass::SassExtensions::Functions::FontFiles end diff --git a/lib/compass/sass_extensions/functions/image_size.rb b/lib/compass/sass_extensions/functions/image_size.rb new file mode 100644 index 00000000..addf7a58 --- /dev/null +++ b/lib/compass/sass_extensions/functions/image_size.rb @@ -0,0 +1,34 @@ +module Compass::SassExtensions::Functions::ImageSize + def image_width(image_file) + width = compute_size(image_file).first + Sass::Script::Number.new(width,["px"]) + end + + def image_height(image_file) + height = compute_size(image_file).last + Sass::Script::Number.new(height, ["px"]) + end + +private + # Returns an array [width,height] containing image dimensions + def compute_size(image_path) + path = image_path.value + # Compute the real path to the image on the file stystem if the images_dir is set. + real_path = if Compass.configuration.images_dir + File.join(Compass.configuration.project_path, Compass.configuration.images_dir, path) + else + File.join(Compass.configuration.project_path, path) + end + case real_path + when /\.png$/i + IO.read(real_path)[0x10..0x18].unpack('NN') + when /\.gif$/i + IO.read(real_path)[6..10].unpack('SS') + when /\.jpe?g$/i + # FIXME jpgs are not straightforward + raise Compass::Error, "JPEG files are not supported yet." + else + raise Compass::Error, "File is either not an image, or is not supported." + end + end +end From a075a10f59345ad6aa6745c0079f875c4417dfdf Mon Sep 17 00:00:00 2001 From: Deepak Jois Date: Thu, 18 Feb 2010 09:58:16 -0800 Subject: [PATCH 17/48] Adding support for calculating JPG dimensions --- .../sass_extensions/functions/image_size.rb | 113 ++++++++++++++---- 1 file changed, 89 insertions(+), 24 deletions(-) diff --git a/lib/compass/sass_extensions/functions/image_size.rb b/lib/compass/sass_extensions/functions/image_size.rb index addf7a58..453010bc 100644 --- a/lib/compass/sass_extensions/functions/image_size.rb +++ b/lib/compass/sass_extensions/functions/image_size.rb @@ -1,34 +1,99 @@ module Compass::SassExtensions::Functions::ImageSize - def image_width(image_file) - width = compute_size(image_file).first + def image_width(image_file) + image_path = real_path(image_file) + width = ImageProperties.new(image_path).size.first Sass::Script::Number.new(width,["px"]) end - + def image_height(image_file) - height = compute_size(image_file).last + image_path = real_path(image_file) + height = ImageProperties.new(image_path).size.last Sass::Script::Number.new(height, ["px"]) end - + private - # Returns an array [width,height] containing image dimensions - def compute_size(image_path) - path = image_path.value + def real_path(image_file) + path = image_file.value # Compute the real path to the image on the file stystem if the images_dir is set. - real_path = if Compass.configuration.images_dir - File.join(Compass.configuration.project_path, Compass.configuration.images_dir, path) - else - File.join(Compass.configuration.project_path, path) - end - case real_path - when /\.png$/i - IO.read(real_path)[0x10..0x18].unpack('NN') - when /\.gif$/i - IO.read(real_path)[6..10].unpack('SS') - when /\.jpe?g$/i - # FIXME jpgs are not straightforward - raise Compass::Error, "JPEG files are not supported yet." + if Compass.configuration.images_dir + File.join(Compass.configuration.project_path, Compass.configuration.images_dir, path) else - raise Compass::Error, "File is either not an image, or is not supported." - end - end + File.join(Compass.configuration.project_path, path) + end + end + + class ImageProperties + def initialize(file) + @file = file + @file_type = File.extname(@file)[1..-1] + end + + def size + @dimensions ||= send("get_size_for_#{@file_type}") + end + + private + def get_size_for_png + IO.read(@file)[0x10..0x18].unpack('NN') + end + + def get_size_for_gif + size = IO.read(@file)[6..10].unpack('SS') + size.inspect + end + + def get_size_for_bmp + d = IO.read(@file)[14..28] + d[0] == 40 ? d[4..-1].unpack('LL') : d[4..8].unpack('SS') + end + + def get_size_for_jpg + get_size_for_jpeg + end + + def get_size_for_jpeg + jpeg = JPEG.new(@file) + [jpeg.width, jpeg.height] + end + end + + class JPEG + attr_reader :width, :height, :bits + + def initialize(file) + if file.kind_of? IO + examine(file) + else + File.open(file, 'rb') { |io| examine(io) } + end + end + + private + def examine(io) + raise 'malformed JPEG' unless io.getc == 0xFF && io.getc == 0xD8 # SOI + + class << io + def readint; (readchar << 8) + readchar; end + def readframe; read(readint - 2); end + def readsof; [readint, readchar, readint, readint, readchar]; end + def next + c = readchar while c != 0xFF + c = readchar while c == 0xFF + c + end + end + + while marker = io.next + case marker + when 0xC0..0xC3, 0xC5..0xC7, 0xC9..0xCB, 0xCD..0xCF # SOF markers + length, @bits, @height, @width, components = io.readsof + raise 'malformed JPEG' unless length == 8 + components * 3 + when 0xD9, 0xDA: break # EOI, SOS + when 0xFE: @comment = io.readframe # COM + when 0xE1: io.readframe # APP1, contains EXIF tag + else io.readframe # ignore frame + end + end + end +end end From 719cd980ae438093d33876a06c956ce388ee78d1 Mon Sep 17 00:00:00 2001 From: Jacques Crocker Date: Sat, 20 Feb 2010 12:43:10 -0800 Subject: [PATCH 18/48] Separating out Rails2 actionpack integration logic Rails3 has different internal implementations on ActionPack which is causing breakage when trying to calculate image_paths. Lets only calculate this logic for Rails 2 at the moment, and figure out what to do with Rails3 later --- .../rails/{ => actionpack2}/action_controller.rb | 0 .../rails/{ => actionpack2}/sass_plugin.rb | 0 .../app_integration/rails/{ => actionpack2}/urls.rb | 0 lib/compass/app_integration/rails/runtime.rb | 12 ++++++++---- 4 files changed, 8 insertions(+), 4 deletions(-) rename lib/compass/app_integration/rails/{ => actionpack2}/action_controller.rb (100%) rename lib/compass/app_integration/rails/{ => actionpack2}/sass_plugin.rb (100%) rename lib/compass/app_integration/rails/{ => actionpack2}/urls.rb (100%) diff --git a/lib/compass/app_integration/rails/action_controller.rb b/lib/compass/app_integration/rails/actionpack2/action_controller.rb similarity index 100% rename from lib/compass/app_integration/rails/action_controller.rb rename to lib/compass/app_integration/rails/actionpack2/action_controller.rb diff --git a/lib/compass/app_integration/rails/sass_plugin.rb b/lib/compass/app_integration/rails/actionpack2/sass_plugin.rb similarity index 100% rename from lib/compass/app_integration/rails/sass_plugin.rb rename to lib/compass/app_integration/rails/actionpack2/sass_plugin.rb diff --git a/lib/compass/app_integration/rails/urls.rb b/lib/compass/app_integration/rails/actionpack2/urls.rb similarity index 100% rename from lib/compass/app_integration/rails/urls.rb rename to lib/compass/app_integration/rails/actionpack2/urls.rb diff --git a/lib/compass/app_integration/rails/runtime.rb b/lib/compass/app_integration/rails/runtime.rb index 82a353d1..d1a5ed5b 100644 --- a/lib/compass/app_integration/rails/runtime.rb +++ b/lib/compass/app_integration/rails/runtime.rb @@ -1,10 +1,14 @@ unless defined?(Compass::RAILS_LOADED) Compass::RAILS_LOADED = true - - %w(action_controller sass_plugin urls).each do |lib| - require "compass/app_integration/rails/#{lib}" + + if ActionPack::VERSION::MAJOR >= 3 + # figure something out so image_path works with rails integration + else + %w(action_controller sass_plugin urls).each do |lib| + require "compass/app_integration/rails/actionpack2/#{lib}" + end end - + # Wierd that this has to be re-included to pick up sub-modules. Ruby bug? class Sass::Script::Functions::EvaluationContext include Sass::Script::Functions From 2b985fd191b02aface72e52111d0ad818e73ad78 Mon Sep 17 00:00:00 2001 From: Jacques Crocker Date: Sat, 20 Feb 2010 12:48:58 -0800 Subject: [PATCH 19/48] Adding PathName support for add_project_configuration --- lib/compass/configuration/helpers.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/compass/configuration/helpers.rb b/lib/compass/configuration/helpers.rb index 643523fa..f2aa9f34 100644 --- a/lib/compass/configuration/helpers.rb +++ b/lib/compass/configuration/helpers.rb @@ -31,6 +31,7 @@ module Compass if config.is_a?(Compass::Configuration::Data) config elsif config.respond_to?(:read) + filename ||= config.to_s if config.is_a?(Pathname) Compass::Configuration::Data.new_from_string(config.read, filename) elsif config.is_a?(Hash) Compass::Configuration::Data.new(filename, config) From 5fc52baa0257f9b0ae12e3d186ecd2c4842e816d Mon Sep 17 00:00:00 2001 From: Jacques Crocker Date: Sat, 20 Feb 2010 13:06:29 -0800 Subject: [PATCH 20/48] Adding Pathname support to compass configs --- lib/compass/configuration/serialization.rb | 1 + test/configuration_test.rb | 30 ++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/lib/compass/configuration/serialization.rb b/lib/compass/configuration/serialization.rb index ed93686b..902e7556 100644 --- a/lib/compass/configuration/serialization.rb +++ b/lib/compass/configuration/serialization.rb @@ -41,6 +41,7 @@ module Compass eval(contents, bind, filename) ATTRIBUTES.each do |prop| value = eval(prop.to_s, bind) rescue nil + value = value.to_s if value.is_a?(Pathname) self.send("#{prop}=", value) unless value.nil? end if @added_import_paths diff --git a/test/configuration_test.rb b/test/configuration_test.rb index d13c528e..1fca5d1a 100644 --- a/test/configuration_test.rb +++ b/test/configuration_test.rb @@ -93,6 +93,36 @@ css_dir = "css" # To enable relative paths to assets via compass helper functions. Uncomment: # relative_assets = true additional_import_paths = ["../foo", "/path/to/my/framework"] +EXPECTED + assert_equal "/", Compass.configuration.http_path + assert_equal expected_serialization.split("\n"), Compass.configuration.serialize.split("\n") + end + + def test_config_with_pathname + contents = StringIO.new(<<-CONFIG) + http_path = "/" + project_path = Pathname.new("/home/chris/my_compass_project") + css_dir = "css" + additional_import_paths = ["../foo"] + add_import_path "/path/to/my/framework" + CONFIG + + Compass.add_configuration(contents, "test_additional_import_paths") + + assert Compass.configuration.to_sass_engine_options[:load_paths].include?("/home/chris/my_compass_project/../foo") + assert Compass.configuration.to_sass_engine_options[:load_paths].include?("/path/to/my/framework"), Compass.configuration.to_sass_engine_options[:load_paths].inspect + assert_equal "/home/chris/my_compass_project/css/framework", Compass.configuration.to_sass_plugin_options[:template_location]["/path/to/my/framework"] + assert_equal "/home/chris/my_compass_project/css/foo", Compass.configuration.to_sass_plugin_options[:template_location]["/home/chris/my_compass_project/../foo"] + + expected_serialization = < Date: Sun, 21 Feb 2010 17:31:37 -0800 Subject: [PATCH 21/48] Provide a convenience function for discovering extensions. --- lib/compass/commands/installer_command.rb | 4 +--- lib/compass/commands/project_base.rb | 4 +--- lib/compass/configuration/helpers.rb | 6 ++++++ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/compass/commands/installer_command.rb b/lib/compass/commands/installer_command.rb index b7245ec2..39298999 100644 --- a/lib/compass/commands/installer_command.rb +++ b/lib/compass/commands/installer_command.rb @@ -12,9 +12,7 @@ module Compass Compass.add_project_configuration(:project_type => options.delete(:project_type)) end Compass.add_configuration(options, 'command_line') - if File.exists?(Compass.configuration.extensions_path) - Compass::Frameworks.discover(Compass.configuration.extensions_path) - end + Compass.discover_extensions! Compass.add_configuration(installer.completed_configuration, 'installer') end diff --git a/lib/compass/commands/project_base.rb b/lib/compass/commands/project_base.rb index 5d5c3312..97fb8f39 100644 --- a/lib/compass/commands/project_base.rb +++ b/lib/compass/commands/project_base.rb @@ -23,9 +23,7 @@ module Compass def configure! add_project_configuration - if File.exists?(Compass.configuration.extensions_path) - Compass::Frameworks.discover(Compass.configuration.extensions_path) - end + Compass.discover_extensions! end def add_project_configuration diff --git a/lib/compass/configuration/helpers.rb b/lib/compass/configuration/helpers.rb index 643523fa..c272fead 100644 --- a/lib/compass/configuration/helpers.rb +++ b/lib/compass/configuration/helpers.rb @@ -88,6 +88,12 @@ module Compass end end + def discover_extensions! + if File.exists?(configuration.extensions_path) + Compass::Frameworks.discover(configuration.extensions_path) + end + end + # Returns a full path to the relative path to the project directory def projectize(path, project_path = nil) project_path ||= configuration.project_path From 34478112ba73be63f45c528cf2c55617163c8508 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Sun, 21 Feb 2010 17:32:23 -0800 Subject: [PATCH 22/48] Add a warning message to the logger. --- lib/compass/logger.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/compass/logger.rb b/lib/compass/logger.rb index 7f726689..bd6c97a1 100644 --- a/lib/compass/logger.rb +++ b/lib/compass/logger.rb @@ -2,12 +2,13 @@ module Compass class Logger - DEFAULT_ACTIONS = [:directory, :exists, :remove, :create, :overwrite, :compile, :error, :identical] + DEFAULT_ACTIONS = [:directory, :exists, :remove, :create, :overwrite, :compile, :error, :identical, :warning] COLORS = { :clear => 0, :red => 31, :green => 32, :yellow => 33 } ACTION_COLORS = { :error => :red, + :warning => :yellow, :compile => :green, :overwrite => :yellow, :create => :green, From ad4a486ea1ea3123e2182c090c17674d38de8d90 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Sun, 21 Feb 2010 22:44:38 -0800 Subject: [PATCH 23/48] Simpler gradient output by discarding from() and to() --- .../stylesheets/compass/css3/_gradient.sass | 90 +++++++------ .../functions/gradient_support.rb | 123 ++++++++++++------ .../stylesheets/compass/css/gradients.css | 70 +++++++--- .../stylesheets/compass/sass/gradients.sass | 26 +++- 4 files changed, 212 insertions(+), 97 deletions(-) diff --git a/frameworks/compass/stylesheets/compass/css3/_gradient.sass b/frameworks/compass/stylesheets/compass/css3/_gradient.sass index 526f2bc0..2e874e32 100644 --- a/frameworks/compass/stylesheets/compass/css3/_gradient.sass +++ b/frameworks/compass/stylesheets/compass/css3/_gradient.sass @@ -1,44 +1,58 @@ -=gradient(!type, !coords, !color_start, !color_end, !color_stop = false) - !gradient= "#{!coords}, from(#{!color_start}), to(#{!color_end})" - @if !color_stop - !gradient= !gradient + ", " + !color_stop - background: -webkit-gradient(#{!type}, #{!gradient}) - background: -moz-#{!type}-gradient(#{!gradient}) - -//* - // This will yield a radial gradient with an apparent specular highlight - +radial-gradient("45 45, 10, 52 50, 30", Cyan, DodgerBlue) - -=radial-gradient(!coords, !color1, !color2, !color_stop = false) - +gradient("radial", !coords, !color1, !color2, !color_stop) - -//* - // This yields a linear gradient spanning from top to bottom - +linear-gradient(color_stops(white, black)) - - // This yields a linear gradient spanning from bottom to top - +linear-gradient(color_stops(white, black), "bottom") - - // This yields a linear gradient spanning from left to right - +linear-gradient(color_stops(white, black), "left") - - // This yields a linear gradient starting at white passing - // thru blue at 33% down and then to black - +linear-gradient(color_stops(white, blue 33%, black)) - - // This yields a linear gradient starting at white passing - // thru blue at 33% down and then to black at 67% until the end - +linear-gradient(color_stops(white, blue 33%, black 67%)) +// This yields a linear gradient spanning from top to bottom +// +// +linear-gradient(color_stops(white, black)) +// +// This yields a linear gradient spanning from bottom to top +// +// +linear-gradient(color_stops(white, black), "bottom") +// +// This yields a linear gradient spanning from left to right +// +// +linear-gradient(color_stops(white, black), "left") +// +// This yields a linear gradient starting at white passing +// thru blue at 33% down and then to black +// +// +linear-gradient(color_stops(white, blue 33%, black)) +// +// This yields a linear gradient starting at white passing +// thru blue at 33% down and then to black at 67% until the end +// +// +linear-gradient(color_stops(white, blue 33%, black 67%)) +// +// Browsers Supported: +// +// - Chrome +// - Safari +// - Firefox 3.6 =linear-gradient(!color_stops, !start = "top") // Firefox's gradient api is nice. // Webkit's gradient api sucks -- hence these backflips: !end = grad_opposite_position(!start) - !start_color = grad_start_color(!color_stops) - !end_color = grad_end_color(!color_stops) - !webkit_stops = grad_color_stops(!color_stops) - !gradient= "#{grad_point(!start)}, #{grad_point(!end)}, from(#{!start_color}), to(#{!end_color})" - @if !webkit_stops - !gradient= !gradient + ", " + !webkit_stops - background-image: -webkit-gradient(linear, #{!gradient}) + background-image: -webkit-gradient(linear, #{grad_point(!start)}, #{grad_point(!end)}, #{grad_color_stops(!color_stops)}) background-image: -moz-linear-gradient(#{!start}, #{!color_stops}) + +// Due to limitation's of webkit, the radial gradient mixin works best if you use +// pixel-based color stops. +// +// Examples: +// +// // Defaults to a centered, 100px radius gradient +// +radial-gradient(color_stops(#c00, #00c)) +// // 100px radius gradient in the top left corner +// +radial-gradient(color_stops(#c00, #00c), "top left") +// // Three colors, ending at 50px and passing thru #fff at 25px +// +radial-gradient(color_stops(#c00, #fff, #00c 50px)) +// +// Browsers Supported: +// +// - Chrome +// - Safari +// - Firefox 3.6 + +=radial-gradient(!color_stops, !center_position = "center center") + !end_pos = grad_end_position(!color_stops, true) + background-image: -webkit-gradient(radial, #{grad_point(!center_position)}, 0, #{grad_point(!center_position)}, #{!end_pos}, #{grad_color_stops(!color_stops)}) + background-image: -moz-radial-gradient(#{!center_position}, circle, #{!color_stops}) + diff --git a/lib/compass/sass_extensions/functions/gradient_support.rb b/lib/compass/sass_extensions/functions/gradient_support.rb index 764e679b..34dcbadf 100644 --- a/lib/compass/sass_extensions/functions/gradient_support.rb +++ b/lib/compass/sass_extensions/functions/gradient_support.rb @@ -25,8 +25,11 @@ module Compass::SassExtensions::Functions::GradientSupport s = "#{color}" if stop s << " " - s << stop.times(Sass::Script::Number.new(100)).to_s - s << "%" + if stop.unitless? + s << stop.times(Sass::Script::Number.new(100, ["%"])).to_s + else + s << stop.to_s + end end s end @@ -41,6 +44,7 @@ module Compass::SassExtensions::Functions::GradientSupport when "bottom" then "top" when "left" then "right" when "right" then "left" + when "center" then "center" else raise Sass::SyntaxError, "Cannot determine the opposite of #{pos}" end @@ -50,49 +54,53 @@ module Compass::SassExtensions::Functions::GradientSupport # returns color-stop() calls for use in webkit. def grad_color_stops(color_list) - positions = color_list.values.map{|c| [c.stop && c.stop.value, c.color]} - # fill in the blank positions - positions[0][0] = 0 unless positions.first.first - positions[positions.size - 1][0] = 1 unless positions.last.first - for i in 0...positions.size - if positions[i].first.nil? - num = 2.0 - for j in (i+1)...positions.size - if positions[j].first - positions[i][0] = positions[i-1].first + (positions[j].first - positions[i-1].first) / num - break - else - num += 1 - end + normalize_stops!(color_list) + max = color_list.values.last.stop + color_stops = color_list.values.map do |pos| + # have to convert absolute units to percentages for use in color stop functions. + stop = pos.stop + stop = stop.div(max).times(Sass::Script::Number.new(100,["%"])) if stop.numerator_units == max.numerator_units + "color-stop(#{stop}, #{pos.color})" + end + Sass::Script::String.new(color_stops.join(", ")) + end + + # returns the end position of the gradient from the color stop + def grad_end_position(color_list, radial = Sass::Script::Bool.new(false)) + default = Sass::Script::Number.new(100) + grad_position(color_list, Sass::Script::Number.new(color_list.values.size), default, radial) + end + + def grad_position(color_list, index, default, radial = Sass::Script::Bool.new(false)) + stop = color_list.values[index.value - 1].stop + if stop && radial.to_bool + orig_stop = stop + if stop.unitless? + if stop.value <= 1 + # A unitless number is assumed to be a percentage when it's between 0 and 1 + stop = stop.times(Sass::Script::Number.new(100, ["%"])) + else + # Otherwise, a unitless number is assumed to be in pixels + stop = stop.times(Sass::Script::Number.new(1, ["px"])) end end - end - positions = positions[1..-1] if positions.first.first == 0.0 - positions = positions[0..-2] if positions.last.first == 1.0 - if positions.empty? - # We return false here since sass has no nil. - Sass::Script::Bool.new(false) + if stop.numerator_units == ["%"] && color_list.values.last.stop && color_list.values.last.stop.numerator_units == ["px"] + stop = stop.times(color_list.values.last.stop).div(Sass::Script::Number.new(100, ["%"])) + end + Compass::Logger.new.record(:warning, "Webkit only supports pixels for the start and end stops for radial gradients. Got: #{orig_stop}") if stop.numerator_units != ["px"] + stop.div(Sass::Script::Number.new(1, stop.numerator_units, stop.denominator_units)) + elsif stop + stop else - color_stops = positions.map {|pos| "color-stop(#{Sass::Script::Number.new((pos.first*10000).round/100.0).to_s}%, #{pos.last})"} - Sass::Script::String.new(color_stops.join(", ")) + default end end - # the first color from a list of color stops - def grad_start_color(color_list) - color_list.values.first.color - end - - # the last color from a list of color stops - def grad_end_color(color_list) - color_list.values.last.color - end - # the given a position, return a point in percents def grad_point(position) position = position.value position = if position[" "] - if position =~ /(top|bottom) (left|right)/ + if position =~ /(top|bottom|center) (left|right|center)/ "#{$2} #{$1}" else position @@ -103,9 +111,16 @@ module Compass::SassExtensions::Functions::GradientSupport "left #{position}" when /left|right/ "#{position} top" + else + position end end - Sass::Script::String.new position.gsub(/top/, "0%").gsub(/bottom/, "100%").gsub(/left/,"0%").gsub(/right/,"100%") + Sass::Script::String.new(position. + gsub(/top/, "0%"). + gsub(/bottom/, "100%"). + gsub(/left/,"0%"). + gsub(/right/,"100%"). + gsub(/center/, "50%")) end def color_stops(*args) @@ -125,7 +140,11 @@ module Compass::SassExtensions::Functions::GradientSupport end stop = Sass::Script::Number.new(number) elsif !stop.nil? - raise Sass::SyntaxError, "A color stop location must be between 0 and 1 or 0% and 100%. Got: #{stop}" + number = Sass::Script::Parser.parse(stop, 0, 0) + unless number.is_a?(Sass::Script::Number) + raise Sass::SyntaxError, "A color stop location must be a number. Got: #{stop}" + end + stop = number end ColorStop.new(color, stop) else @@ -133,5 +152,35 @@ module Compass::SassExtensions::Functions::GradientSupport end end) end + private + def normalize_stops!(color_list) + positions = color_list.values + # fill in the start and end positions, if unspecified + positions.first.stop = Sass::Script::Number.new(0) unless positions.first.stop + positions.last.stop = Sass::Script::Number.new(100, ["%"]) unless positions.last.stop + # fill in empty values + for i in 0...positions.size + if positions[i].stop.nil? + num = 2.0 + for j in (i+1)...positions.size + if positions[j].stop + positions[i].stop = positions[i-1].stop.plus((positions[j].stop.minus(positions[i-1].stop)).div(Sass::Script::Number.new(num))) + break + else + num += 1 + end + end + end + end + # normalize unitless numbers + positions.each do |pos| + if pos.stop.unitless? && pos.stop.value <= 1 + pos.stop = pos.stop.times(Sass::Script::Number.new(100, ["%"])) + elsif pos.stop.unitless? + pos.stop = pos.stop.times(Sass::Script::Number.new(1, ["px"])) + end + end + nil + end end end diff --git a/test/fixtures/stylesheets/compass/css/gradients.css b/test/fixtures/stylesheets/compass/css/gradients.css index 93f0acf6..dcdf94b0 100644 --- a/test/fixtures/stylesheets/compass/css/gradients.css +++ b/test/fixtures/stylesheets/compass/css/gradients.css @@ -1,43 +1,71 @@ .linear-1 { - background-image: -webkit-gradient(linear, 0% 0%, 100% 0%, from(#dddddd), to(#aaaaaa)); - background-image: -moz-linear-gradient(top, #dddddd, #aaaaaa); } + background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(0%, #dddddd), color-stop(100%, #aaaaaa)); + background-image: -moz-linear-gradient(top, #dddddd 0%, #aaaaaa 100%); } .linear-2 { - background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#dddddd), to(#aaaaaa)); - background-image: -moz-linear-gradient(left, #dddddd, #aaaaaa); } + background-image: -webkit-gradient(linear, 0% 0%, 100% 0%, color-stop(0%, #dddddd), color-stop(100%, #aaaaaa)); + background-image: -moz-linear-gradient(left, #dddddd 0%, #aaaaaa 100%); } .linear-3 { - background-image: -webkit-gradient(linear, 0% 0%, 100% 100%, from(#dddddd), to(#aaaaaa)); - background-image: -moz-linear-gradient(top left, #dddddd, #aaaaaa); } + background-image: -webkit-gradient(linear, 0% 0%, 100% 100%, color-stop(0%, #dddddd), color-stop(100%, #aaaaaa)); + background-image: -moz-linear-gradient(top left, #dddddd 0%, #aaaaaa 100%); } .linear-4 { - background-image: -webkit-gradient(linear, 0% 100%, 100% 0%, from(#dddddd), to(#aaaaaa)); - background-image: -moz-linear-gradient(top right, #dddddd, #aaaaaa); } + background-image: -webkit-gradient(linear, 100% 0%, 0% 100%, color-stop(0%, #dddddd), color-stop(100%, #aaaaaa)); + background-image: -moz-linear-gradient(top right, #dddddd 0%, #aaaaaa 100%); } .linear-5 { - background-image: -webkit-gradient(linear, 0% 0%, 100% 0%, from(#dddddd), to(#aaaaaa), color-stop(50%, #cccccc)); - background-image: -moz-linear-gradient(top, #dddddd, #cccccc, #aaaaaa); } + background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(0%, #dddddd), color-stop(50%, #cccccc), color-stop(100%, #aaaaaa)); + background-image: -moz-linear-gradient(top, #dddddd 0%, #cccccc 50%, #aaaaaa 100%); } .linear-6 { - background-image: -webkit-gradient(linear, 0% 0%, 100% 0%, from(#dddddd), to(#aaaaaa), color-stop(20%, #cccccc)); - background-image: -moz-linear-gradient(top, #dddddd, #cccccc 20%, #aaaaaa); } + background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(0%, #dddddd), color-stop(20%, #cccccc), color-stop(100%, #aaaaaa)); + background-image: -moz-linear-gradient(top, #dddddd 0%, #cccccc 20%, #aaaaaa 100%); } .linear-7 { - background-image: -webkit-gradient(linear, 0% 0%, 100% 0%, from(#dddddd), to(#aaaaaa), color-stop(20%, #cccccc), color-stop(60%, #eeeeee)); - background-image: -moz-linear-gradient(top, #dddddd, #cccccc 20%, #eeeeee, #aaaaaa); } + background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(0%, #dddddd), color-stop(20%, #cccccc), color-stop(50.1%, #eeeeee), color-stop(100%, #aaaaaa)); + background-image: -moz-linear-gradient(top, #dddddd 0%, #cccccc 20%, #eeeeee 50.1%, #aaaaaa 100%); } .linear-8 { - background-image: -webkit-gradient(linear, 0% 0%, 100% 0%, from(#dddddd), to(#aaaaaa), color-stop(80%, #dddddd)); - background-image: -moz-linear-gradient(top, #dddddd 80%, #aaaaaa); } + background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(80%, #dddddd), color-stop(100%, #aaaaaa)); + background-image: -moz-linear-gradient(top, #dddddd 80%, #aaaaaa 100%); } .linear-9 { - background-image: -webkit-gradient(linear, 0% 0%, 100% 0%, from(#dddddd), to(#aaaaaa), color-stop(20%, #aaaaaa)); - background-image: -moz-linear-gradient(top, #dddddd, #aaaaaa 20%); } + background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(0%, #dddddd), color-stop(100%, #aaaaaa)); + background-image: -moz-linear-gradient(top, #dddddd 0%, #aaaaaa 20%); } .linear-10 { - background-image: -webkit-gradient(linear, 0% 0%, 100% 0%, from(#dddddd), to(#aaaaaa), color-stop(40%, #dddddd), color-stop(50%, #aaaaaa)); + background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(80%, #dddddd), color-stop(100%, #aaaaaa)); background-image: -moz-linear-gradient(top, #dddddd 40%, #aaaaaa 50%); } .linear-11 { - background-image: -webkit-gradient(linear, 0% 0%, 100% 0%, from(#dddddd), to(#aaaaaa), color-stop(40%, #dddddd), color-stop(45%, black), color-stop(50%, #aaaaaa)); - background-image: -moz-linear-gradient(top, #dddddd 40%, black, #aaaaaa 50%); } + background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(80%, #dddddd), color-stop(90%, black), color-stop(100%, #aaaaaa)); + background-image: -moz-linear-gradient(top, #dddddd 40%, black 45%, #aaaaaa 50%); } + +.radial-1 { + background-image: -webkit-gradient(radial, 50% 50%, 0, 50% 50%, 100, color-stop(0%, #dddddd), color-stop(100%, #aaaaaa)); + background-image: -moz-radial-gradient(center center, circle, #dddddd 0%, #aaaaaa 100%); } + +.radial-2 { + background-image: -webkit-gradient(radial, 50% 50%, 0, 50% 50%, 100, color-stop(0%, #dddddd), color-stop(100%, #aaaaaa)); + background-image: -moz-radial-gradient(center center, circle, #dddddd 0%, #aaaaaa 100%); } + +.radial-3 { + background-image: -webkit-gradient(radial, 50% 0%, 0, 50% 0%, 100, color-stop(0%, #dddddd), color-stop(100%, #aaaaaa)); + background-image: -moz-radial-gradient(top center, circle, #dddddd 0%, #aaaaaa 100%); } + +.radial-4 { + background-image: -webkit-gradient(radial, 50% 50%, 0, 50% 50%, 100, color-stop(0%, #dddddd), color-stop(100%, #aaaaaa)); + background-image: -moz-radial-gradient(center center, circle, #dddddd 0%, #aaaaaa 100%); } + +.radial-5 { + background-image: -webkit-gradient(radial, 50% 0%, 0, 50% 0%, 100, color-stop(0%, #dddddd), color-stop(100%, #aaaaaa)); + background-image: -moz-radial-gradient(top center, circle, #dddddd 0%, #aaaaaa 100%); } + +.radial-6 { + background-image: -webkit-gradient(radial, 50% 50%, 0, 50% 50%, 50, color-stop(40%, #dddddd), color-stop(100%, #aaaaaa)); + background-image: -moz-radial-gradient(center center, circle, #dddddd 20px, #aaaaaa 50px); } + +.radial-7 { + background-image: -webkit-gradient(radial, 50% 50%, 0, 50% 50%, 50, color-stop(20%, #dddddd), color-stop(100%, #aaaaaa)); + background-image: -moz-radial-gradient(center center, circle, #dddddd 20%, #aaaaaa 50px); } diff --git a/test/fixtures/stylesheets/compass/sass/gradients.sass b/test/fixtures/stylesheets/compass/sass/gradients.sass index 1f729437..43141bf8 100644 --- a/test/fixtures/stylesheets/compass/sass/gradients.sass +++ b/test/fixtures/stylesheets/compass/sass/gradients.sass @@ -21,4 +21,28 @@ .linear-10 +linear-gradient(color_stops(#ddd 40%, #aaa 50%)) .linear-11 - +linear-gradient(color_stops(#ddd 40%, #000, #aaa 50%)) \ No newline at end of file + +linear-gradient(color_stops(#ddd 40%, #000, #aaa 50%)) +.radial-1 + // A default radial gradient: + // A centered gradient having the shape of the container (aka ellipse) + +radial-gradient(color_stops(#ddd, #aaa)) +.radial-2 + // A centered gradient having the shape of the container (aka ellipse) + +radial-gradient(color_stops(#ddd, #aaa)) +.radial-3 + // A centered gradient at the top having the shape of the container (aka ellipse) + +radial-gradient(color_stops(#ddd, #aaa), "top center") +.radial-4 + // A centered gradient having a circular shape + +radial-gradient(color_stops(#ddd, #aaa)) +.radial-5 + // A centered gradient at the top having a circular shape + +radial-gradient(color_stops(#ddd, #aaa), "top center") +.radial-6 + // A centered circular gradient with color stops + // The color stops must be absolute units + +radial-gradient(color_stops(#ddd 20px, #aaa 50px)) +.radial-7 + // A centered elliptical gradient with color stops + // The color stops must be relative units + +radial-gradient(color_stops(#ddd 20%, #aaa 50px)) From fd11471a5a58c223e460a40b473b9c1c1fda1818 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Sun, 21 Feb 2010 23:06:16 -0800 Subject: [PATCH 24/48] Update the gradient examples --- examples/css3/gradients.html.haml | 60 +++++++++++++++++++++++++++ examples/css3/index.html.haml | 18 +------- examples/css3/src/gradient.sass | 10 ----- examples/css3/src/gradients.sass | 69 +++++++++++++++++++++++++++++++ examples/css3/src/main.sass | 32 ++++++++++++-- 5 files changed, 160 insertions(+), 29 deletions(-) create mode 100644 examples/css3/gradients.html.haml delete mode 100644 examples/css3/src/gradient.sass create mode 100644 examples/css3/src/gradients.sass diff --git a/examples/css3/gradients.html.haml b/examples/css3/gradients.html.haml new file mode 100644 index 00000000..a9a3ef3e --- /dev/null +++ b/examples/css3/gradients.html.haml @@ -0,0 +1,60 @@ +!!! +%html + %head + %link(href="stylesheets/gradients.css" rel="stylesheet" type="text/css") + %body + %table + %thead + %th   + %th.linear Linear + %th.radial Radial + %tbody + %tr.default + %th Default + %td.linear


+ %td.radial


+ %tr.default + %th + %td.linear-code + %td.radial-code + %tr.top-left + %th Top Left + %td.linear


+ %td.radial


+ %tr.top-left + %th + %td.linear-code + %td.radial-code + %tr.bottom-right + %th Bottom Right + %td.linear


+ %td.radial


+ %tr.bottom-right + %th + %td.linear-code + %td.radial-code + %tr.three-color + %th Three Evenly-spaced Colors + %td.linear


+ %td.radial


+ %tr.three-color + %th + %td.linear-code + %td.radial-code + %tr.four-color + %th Four Positioned Colors + %td.linear


+ %td.radial


+ %tr.four-color + %th + %td.linear-code + %td.radial-code + %tr.filled-in + %th Filled-in End-points + %td.linear


+ %td.radial


+ %tr.filled-in + %th + %td.linear-code + %td.radial-code + diff --git a/examples/css3/index.html.haml b/examples/css3/index.html.haml index e670b44b..abc30750 100644 --- a/examples/css3/index.html.haml +++ b/examples/css3/index.html.haml @@ -39,24 +39,10 @@ :preserve +linear-gradient( color_stops(#d92626, #2626d9)) - %pre.diagonal - %code< - :preserve - - - - - - +linear-gradient( - color_stops(#d92626, #2626d9), - "top left") - - - - %pre.radial %code<> - +radial-gradient(
"center center, 10, center center, 100",
#d92626, #2626d9) + +radial-gradient(
color_stops(#d92626, #2626d9)) + %a(href="gradients.html") More Gradients .examples #border-radius.example %h2 Border Radius diff --git a/examples/css3/src/gradient.sass b/examples/css3/src/gradient.sass deleted file mode 100644 index f46438f9..00000000 --- a/examples/css3/src/gradient.sass +++ /dev/null @@ -1,10 +0,0 @@ -@import compass/css3/gradient.sass - -#gradient - width: 200px - height: 100px - border: 1px solid #777 -.linear - +linear-gradient(color_stops(#fff, #f00 50%, #ff0 75%, #0f0)) -.radial - +radial-gradient("45 45, 10, 52 50, 30", "Cyan", "DodgerBlue") diff --git a/examples/css3/src/gradients.sass b/examples/css3/src/gradients.sass new file mode 100644 index 00000000..53e5ca1f --- /dev/null +++ b/examples/css3/src/gradients.sass @@ -0,0 +1,69 @@ +@import compass/css3.sass + +#gradient + width: 200px + height: 100px + border: 1px solid #777 + +thead th + min-height: 50px + min-width: 100px + +text-shadow(#fff) +th.linear + +linear-gradient(color_stops(#fff, #f00 50%, #ff0 75%, #0f0)) +th.radial + +radial-gradient(color_stops(#fff, #f00 20px, #ff0 30px, #0f0 40px)) +tr.default + td.linear + +linear-gradient(color_stops(#c00, #00c)) + td.radial + +radial-gradient(color_stops(#c00, #00c)) + td.linear-code:before + content: "+linear-gradient(color_stops(#c00, #00c))" + td.radial-code:before + content: "+radial-gradient(color_stops(#c00, #00c))" +tr.top-left + td.linear + +linear-gradient(color_stops(#c00, #00c), "top left") + td.radial + +radial-gradient(color_stops(#c00, #00c), "top left") + td.linear-code:before + content: "+linear-gradient(color_stops(#c00, #00c), \"top left\")" + td.radial-code:before + content: "+radial-gradient(color_stops(#c00, #00c), \"top left\")" +tr.bottom-right + td.linear + +linear-gradient(color_stops(#c00, #00c), "bottom right") + td.radial + +radial-gradient(color_stops(#c00, #00c), "bottom right") + td.linear-code:before + content: "+linear-gradient(color_stops(#c00, #00c), \"bottom right\")" + td.radial-code:before + content: "+radial-gradient(color_stops(#c00, #00c), \"bottom right\")" +tr.three-color + td.linear + +linear-gradient(color_stops(#c00, #fff, #00c)) + td.radial + +radial-gradient(color_stops(#c00, #fff, #00c 50px)) + td.linear-code:before + content: "+linear-gradient(color_stops(#c00, #fff, #00c))" + td.radial-code:before + content: "+radial-gradient(color_stops(#c00, #fff, #00c 50px))" +tr.four-color + td.linear + +linear-gradient(color_stops(#c00, #0c0 25%, #0cc 75%, #00c)) + td.radial + +radial-gradient(color_stops(#c00, #0c0 25%, #0cc 75%, #00c 50px)) + td.linear-code:before + content: "+linear-gradient(color_stops(#c00, #0c0 25%, #0cc 75%, #00c))" + td.radial-code:before + content: "+radial-gradient(color_stops(#c00, #0c0 25%, #0cc 75%, #00c 50px))" +tr.filled-in + td.linear + +linear-gradient(color_stops(#c00 33%, #00c 66%)) + td.radial + +radial-gradient(color_stops(#c00 25px, #00c 75px)) + td.linear-code:before + content: "+linear-gradient(color_stops(#c00 33%, #00c 66%))" + td.radial-code:before + content: "+radial-gradient(color_stops(#c00 25px, #00c 75px))" diff --git a/examples/css3/src/main.sass b/examples/css3/src/main.sass index 06b8dea4..5a6377e8 100644 --- a/examples/css3/src/main.sass +++ b/examples/css3/src/main.sass @@ -76,7 +76,33 @@ h1 .diagonal +linear-gradient(color_stops(#d92626, #2626d9), "right top") .radial - +radial-gradient("center center, 10, center center, 100", #d92626, #2626d9) - background-image: -moz-radial-gradient(20px center, circle, 40px center #d92626 10px, #2626d9 100px) - background-color: #2626d9 + /* +radial-gradient(color_stops(#d92626 0, #2626d9 1)) + +radial-gradient(color_stops(#d92626 10px, #2626d9 150px)) + // +radial-gradient("center center, 10, center center, 100", #d92626, #2626d9) + // background-image: -moz-radial-gradient(20px center, circle, #d92626 10px, #2626d9 100px) + // background-color: #2626d9 + .radial-1 + // A default radial gradient: + /* +radial-gradient(color_stops(#ddd, #aaa)) + +radial-gradient(color_stops(#ddd, #aaa)) + .radial-2 + // A centered gradient + /* +radial-gradient(color_stops(#ddd, #aaa)) + +radial-gradient(color_stops(#ddd, #aaa)) + .radial-3 + // A centered radial gradient at the top + /* +radial-gradient(color_stops(#ddd, #aaa), "top center") + +radial-gradient(color_stops(#ddd, #aaa), "top center") + .radial-4 + // A centered radial gradient with fixed color stops + /* +radial-gradient(color_stops(#ddd 20px, #aaa 50px)) + +radial-gradient(color_stops(#ddd 20px, #aaa 50px)) + .radial-5 + // A centered gradient with several color stops + /* +radial-gradient(color_stops(#ddd 20%, #aaa 50%, #c00)) + +radial-gradient(color_stops(#ddd 20px, #aaa 50%, #c00 200px)) + .radial-6 + // A centered gradient with color stops + /* +radial-gradient(color_stops(#0c0, #ddd 20%, #aaa 50%, #00c)) + +radial-gradient(color_stops(#0c0 0px, #ddd 20px, #aaa 50px, #00c 100px)) From 0a3947d3207cc3301313e2f4d19f73db729c74d8 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Mon, 22 Feb 2010 00:12:23 -0800 Subject: [PATCH 25/48] Add tests, fix some bugs in the image_size helpers, dropped support for bmp because it was broken. --- .../sass_extensions/functions/image_size.rb | 16 +++++++--------- test/compass_test.rb | 2 +- test/fixtures/stylesheets/compass/100x150.jpg | Bin 0 -> 14497 bytes .../stylesheets/compass/css/image_size.css | 15 +++++++++++++++ .../stylesheets/compass/images/100x150.gif | Bin 0 -> 11928 bytes .../stylesheets/compass/images/100x150.jpeg | Bin 0 -> 14497 bytes .../stylesheets/compass/images/100x150.jpg | Bin 0 -> 14497 bytes .../stylesheets/compass/images/100x150.png | Bin 0 -> 10184 bytes .../stylesheets/compass/sass/image_size.sass | 12 ++++++++++++ 9 files changed, 35 insertions(+), 10 deletions(-) create mode 100644 test/fixtures/stylesheets/compass/100x150.jpg create mode 100644 test/fixtures/stylesheets/compass/css/image_size.css create mode 100644 test/fixtures/stylesheets/compass/images/100x150.gif create mode 100644 test/fixtures/stylesheets/compass/images/100x150.jpeg create mode 100644 test/fixtures/stylesheets/compass/images/100x150.jpg create mode 100644 test/fixtures/stylesheets/compass/images/100x150.png create mode 100644 test/fixtures/stylesheets/compass/sass/image_size.sass diff --git a/lib/compass/sass_extensions/functions/image_size.rb b/lib/compass/sass_extensions/functions/image_size.rb index 453010bc..864b8cdc 100644 --- a/lib/compass/sass_extensions/functions/image_size.rb +++ b/lib/compass/sass_extensions/functions/image_size.rb @@ -1,10 +1,12 @@ module Compass::SassExtensions::Functions::ImageSize + # Returns the width of the image relative to the images directory def image_width(image_file) image_path = real_path(image_file) width = ImageProperties.new(image_path).size.first Sass::Script::Number.new(width,["px"]) end + # Returns the height of the image relative to the images directory def image_height(image_file) image_path = real_path(image_file) height = ImageProperties.new(image_path).size.last @@ -15,8 +17,8 @@ private def real_path(image_file) path = image_file.value # Compute the real path to the image on the file stystem if the images_dir is set. - if Compass.configuration.images_dir - File.join(Compass.configuration.project_path, Compass.configuration.images_dir, path) + if Compass.configuration.images_path + File.join(Compass.configuration.images_path, path) else File.join(Compass.configuration.project_path, path) end @@ -29,7 +31,9 @@ private end def size - @dimensions ||= send("get_size_for_#{@file_type}") + @dimensions ||= send(:"get_size_for_#{@file_type}") + rescue NoMethodError + raise Sass::SyntaxError, "Unrecognized file type: #{@file_type}" end private @@ -39,12 +43,6 @@ private def get_size_for_gif size = IO.read(@file)[6..10].unpack('SS') - size.inspect - end - - def get_size_for_bmp - d = IO.read(@file)[14..28] - d[0] == 40 ? d[4..-1].unpack('LL') : d[4..8].unpack('SS') end def get_size_for_jpg diff --git a/test/compass_test.rb b/test/compass_test.rb index d0e43f23..665d0070 100644 --- a/test/compass_test.rb +++ b/test/compass_test.rb @@ -42,7 +42,7 @@ class CompassTest < Test::Unit::TestCase each_css_file(proj.css_path) do |css_file| assert_no_errors css_file, 'compass' end - assert_renders_correctly :reset, :layout, :utilities, :gradients + assert_renders_correctly :reset, :layout, :utilities, :gradients, :image_size end end diff --git a/test/fixtures/stylesheets/compass/100x150.jpg b/test/fixtures/stylesheets/compass/100x150.jpg new file mode 100644 index 0000000000000000000000000000000000000000..7077121348c2117e997b5c6e9d202a069bd1c525 GIT binary patch literal 14497 zcmeHtby$^6*YE5mHf*}Pk?scR4oL~=?kHB8-@iSxX3eZw_slG2t>ek#1>mk3>E#Z9p&>X003ZNxm>7UV z2n%JNG%tXJ-Y_UjLKy`5I)wzWh4^@dx_ClA5%~aMpf^%fTuihA{tvBd1>zrEeA4cC z9+2s2>1qKO#0qx8?|6~_mae+GgNdoJmac*3?+X6QPJw~GC!PEGhX$K!tFfK6wqe6e zL-fpm7;pltlS@dTs)>og3D5s=+8zHrS}-bf!s~xb^FJ*m4~9B~2516NPeV~^9z9L`A_DA&m}MzYReC0z;!Zr&>KntfdI&rL1Vk|?=mN00Gew6AnpHm8ILRg zxGn&ChyGo*ZTfpYVKlEo+$F?+vx8yP06={>KHlbm)L#g|VZrh7{*B|~!z$>Lcn?62 zuS-~P_;1?Zp8-GtB7g%_fF7_wTI2&lKpe;b1#lW@0zF_1%z-tq2QI)9_<>*$0b)P` zNCjCSA6x>Zpd3_#+u%NE1TCNwJOP7X1iS`gU>eMWPv8sK1V6w&3!g^p&VXtA6uzA=j zYzwvrhr@~CRB$FZH(VGl13wMdgPXza;O_81coaMdo&zs|SHkPykKo<#VfZ`v9Q+G> z2Y!qoLQo^v5CRApgc`ySVU2J@1R`P(>4=Mn3dCJR8)5+Q7V!b`6@f=0k>p4gq##lb zsf9F0Iw1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8)J!L;e+ZytkYhk{b92dxv6`Pp)?v2=NJT{j_x2Cfm+KPYc0W5in}Cv;nQ6QJV$y)X z(JehaoiO3FlA2$EgprY#Kn+eEb|`5;ii(N|7^pRfnDDwvaMoZiU3TLalL7>_X?c!r zrKP2H6^pRkaMpm+1`7(DJCY^KfWQphqel-iDPq9!U0o+QZSdmj;pCAFSq7w}q=bM0 zM>o{44d}lbfb#~sOW@=IXAi4n36QF)Dz2kjadENLdFn(vIB&p-g9RloFVC|4mH&1eB;}>3dAvsQh)?p3c(lunrkXq|F9MIztDd=LFM@WSl zGfh&+OuZK}O#>!20ol=j`EVUFV;Do`O;OzLF@T`1lbQG>rh{or30x*bL+&jTu&&G@yQ~Mi&g7ASQm(`HF$1#_z2<&E3vG7MTTTkRv z@L!PzxPT~{JD7%}ftcSA&iBD7#Tp0zQLOMp)BOib;gT+5Yyt`Z0000 Date: Mon, 22 Feb 2010 00:48:11 -0800 Subject: [PATCH 26/48] Update the changelog for v0.10.0.pre6 --- CHANGELOG.markdown | 48 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/CHANGELOG.markdown b/CHANGELOG.markdown index 119d2d06..909d74c8 100644 --- a/CHANGELOG.markdown +++ b/CHANGELOG.markdown @@ -1,6 +1,54 @@ COMPASS CHANGELOG ================= +0.10.0.pre6 (February 22, 2010) +------------------------------- + +**IMPORTANT:** + +* Rails users need to update their compass initializer. +* The CSS 3 Gradient mixins were re-written and their usage has changed. + +Read on for the details: + +### CLI +* Fixed some issues with colorized output. +* Don't force the user to specify the configuration path when calling compass config + +### Compass Core +* Fix to the bang_hack mixin (Credit: Mark Rajcok) +* Support :first-child and :last-child pseudo selectors for +horizontal-list. (Credit: Cody Robbins) +* Clear the sticky footer so that it works correctly with grid layouts. +* The css3 gradient module has been re-written and has a new, much simpler mixins. If you have been using the css3 gradient mixins, you'll need to update your sass stylesheets. The new mixins can be seen in action [here](http://compass-style.org/examples/css3/gradients.html). +* Added new helper functions: `image_width("path/to/image.png")` & `image_height("path/to/image.png")` that return the size in pixels. (Credit: Deepak Jois & Richard Aday) + +### Blueprint +* Take margins into account in liquid grid. (Credit: Christoffer Eliesen) + +### Rails +* Several Rails 3 bug fixes (Credit: Jacques Crocker) +* Don't set unset options on the Sass::Plugin +* Fixed a setup bug and handle compass configuration changes at rails boot. + +**IMPORTANT:** Existing rails projects _must_ change their compass initializer file to: + + require 'compass' + rails_root = (defined?(Rails) ? Rails.root : RAILS_ROOT).to_s + Compass.add_project_configuration(File.join(rails_root, "config", "compass.rb")) + Compass.configure_sass_plugin! + Compass.handle_configuration_change! + +### Internals +* New APIs for dealing with configuration changes and accessing a compiler instance. +* Provide a convenience function for discovering extensions: `Compass.discover_extensions!` that can be called during project configuration w/ other ruby frameworks. + +### Extensions + +* Don't force an extension to register itself just because it has ruby code. + This makes it easier for extensions to provide Sass functions from ruby. + +Special thanks to Daniel Hofstetter for fixing my typos. + 0.10.0.pre5 (January 18, 2010) ------------------------------ * Fixed a bug in the grid builder in ruby 1.8.6 (Credit: [Richard Wöber][der-rich]) From fa21d80fe0c1365725ef728fb36f2c2013e07e89 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Mon, 22 Feb 2010 00:50:45 -0800 Subject: [PATCH 27/48] Bump version for release v0.10.0.pre6 --- VERSION.yml | 2 +- compass.gemspec | 58 ++++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 51 insertions(+), 9 deletions(-) diff --git a/VERSION.yml b/VERSION.yml index d0ed1358..c5bd6169 100644 --- a/VERSION.yml +++ b/VERSION.yml @@ -2,4 +2,4 @@ :patch: 0 :major: 0 :minor: 10 -:build: pre5 +:build: pre6 diff --git a/compass.gemspec b/compass.gemspec index 9e6077a5..f36ba06c 100644 --- a/compass.gemspec +++ b/compass.gemspec @@ -5,11 +5,11 @@ Gem::Specification.new do |s| s.name = %q{compass} - s.version = "0.10.0.pre5" + s.version = "0.10.0.pre6" s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version= s.authors = ["Chris Eppstein"] - s.date = %q{2010-01-19} + s.date = %q{2010-02-22} s.default_executable = %q{compass} s.description = %q{Compass is a Sass-based Stylesheet Framework that streamlines the creation and maintainance of CSS.} s.email = %q{chris@eppsteins.net} @@ -107,15 +107,37 @@ Gem::Specification.new do |s| "examples/compass/sticky_footer.html.haml", "examples/compass/utilities.html.haml", "examples/css3/config.rb", + "examples/css3/extensions/compass-colors/README.markdown", + "examples/css3/extensions/compass-colors/VERSION.yml", + "examples/css3/extensions/compass-colors/example/config.rb", + "examples/css3/extensions/compass-colors/example/src/_split_compliment_theme.sass", + "examples/css3/extensions/compass-colors/example/src/screen.sass", + "examples/css3/extensions/compass-colors/lib/compass-colors.rb", + "examples/css3/extensions/compass-colors/lib/compass-colors/compass_extension.rb", + "examples/css3/extensions/compass-colors/lib/compass-colors/hsl.rb", + "examples/css3/extensions/compass-colors/lib/compass-colors/sass_extensions.rb", + "examples/css3/extensions/compass-colors/spec/approximate_color_matching.rb", + "examples/css3/extensions/compass-colors/spec/sass_extensions_spec.rb", + "examples/css3/extensions/compass-colors/templates/analogous/_theme.sass", + "examples/css3/extensions/compass-colors/templates/analogous/manifest.rb", + "examples/css3/extensions/compass-colors/templates/basic/_theme.sass", + "examples/css3/extensions/compass-colors/templates/basic/manifest.rb", + "examples/css3/extensions/compass-colors/templates/complementary/_theme.sass", + "examples/css3/extensions/compass-colors/templates/complementary/manifest.rb", + "examples/css3/extensions/compass-colors/templates/split_complement/_theme.sass", + "examples/css3/extensions/compass-colors/templates/split_complement/manifest.rb", + "examples/css3/extensions/compass-colors/templates/triadic/_theme.sass", + "examples/css3/extensions/compass-colors/templates/triadic/manifest.rb", "examples/css3/extensions/fancy-fonts/templates/project/Vtks Revolt.ttf", "examples/css3/extensions/fancy-fonts/templates/project/angelina.ttf", "examples/css3/extensions/fancy-fonts/templates/project/fancy-fonts.sass", "examples/css3/extensions/fancy-fonts/templates/project/manifest.rb", + "examples/css3/gradients.html.haml", "examples/css3/images/fresh-peas.jpg", "examples/css3/index.html.haml", "examples/css3/src/_base.sass", "examples/css3/src/fancy-fonts.sass", - "examples/css3/src/gradient.sass", + "examples/css3/src/gradients.sass", "examples/css3/src/main.sass", "examples/css3/stylesheets/fonts/Vtks Revolt.ttf", "examples/css3/stylesheets/fonts/angelina.ttf", @@ -342,13 +364,13 @@ Gem::Specification.new do |s| "lib/compass/app_integration/merb.rb", "lib/compass/app_integration/merb/runtime.rb", "lib/compass/app_integration/rails.rb", - "lib/compass/app_integration/rails/action_controller.rb", + "lib/compass/app_integration/rails/actionpack2/action_controller.rb", + "lib/compass/app_integration/rails/actionpack2/sass_plugin.rb", + "lib/compass/app_integration/rails/actionpack2/urls.rb", "lib/compass/app_integration/rails/configuration_defaults.rb", "lib/compass/app_integration/rails/installer.rb", "lib/compass/app_integration/rails/runtime.rb", - "lib/compass/app_integration/rails/sass_plugin.rb", "lib/compass/app_integration/rails/templates/compass-install-rails.rb", - "lib/compass/app_integration/rails/urls.rb", "lib/compass/app_integration/stand_alone.rb", "lib/compass/app_integration/stand_alone/configuration_defaults.rb", "lib/compass/app_integration/stand_alone/installer.rb", @@ -400,10 +422,11 @@ Gem::Specification.new do |s| "lib/compass/logger.rb", "lib/compass/sass_extensions.rb", "lib/compass/sass_extensions/functions.rb", - "lib/compass/sass_extensions/functions/color_stop.rb", "lib/compass/sass_extensions/functions/display.rb", "lib/compass/sass_extensions/functions/enumerate.rb", "lib/compass/sass_extensions/functions/font_files.rb", + "lib/compass/sass_extensions/functions/gradient_support.rb", + "lib/compass/sass_extensions/functions/image_size.rb", "lib/compass/sass_extensions/functions/inline_image.rb", "lib/compass/sass_extensions/functions/selectors.rb", "lib/compass/sass_extensions/functions/urls.rb", @@ -438,11 +461,20 @@ Gem::Specification.new do |s| "test/fixtures/stylesheets/blueprint/sass/print.sass", "test/fixtures/stylesheets/blueprint/sass/screen.sass", "test/fixtures/stylesheets/blueprint/sass/typography.sass", + "test/fixtures/stylesheets/compass/100x150.jpg", "test/fixtures/stylesheets/compass/config.rb", + "test/fixtures/stylesheets/compass/css/gradients.css", + "test/fixtures/stylesheets/compass/css/image_size.css", "test/fixtures/stylesheets/compass/css/layout.css", "test/fixtures/stylesheets/compass/css/print.css", "test/fixtures/stylesheets/compass/css/reset.css", "test/fixtures/stylesheets/compass/css/utilities.css", + "test/fixtures/stylesheets/compass/images/100x150.gif", + "test/fixtures/stylesheets/compass/images/100x150.jpeg", + "test/fixtures/stylesheets/compass/images/100x150.jpg", + "test/fixtures/stylesheets/compass/images/100x150.png", + "test/fixtures/stylesheets/compass/sass/gradients.sass", + "test/fixtures/stylesheets/compass/sass/image_size.sass", "test/fixtures/stylesheets/compass/sass/layout.sass", "test/fixtures/stylesheets/compass/sass/print.sass", "test/fixtures/stylesheets/compass/sass/reset.sass", @@ -467,11 +499,12 @@ Gem::Specification.new do |s| "test/test_helper.rb", "test/test_rails_helper.rb" ] + s.has_rdoc = false s.homepage = %q{http://compass-style.org} s.rdoc_options = ["--charset=UTF-8"] s.require_paths = ["lib"] s.rubyforge_project = %q{compass} - s.rubygems_version = %q{1.3.5} + s.rubygems_version = %q{1.3.6} s.summary = %q{A Real Stylesheet Framework} s.test_files = [ "test/command_line_helper.rb", @@ -486,11 +519,20 @@ Gem::Specification.new do |s| "test/fixtures/stylesheets/blueprint/sass/print.sass", "test/fixtures/stylesheets/blueprint/sass/screen.sass", "test/fixtures/stylesheets/blueprint/sass/typography.sass", + "test/fixtures/stylesheets/compass/100x150.jpg", "test/fixtures/stylesheets/compass/config.rb", + "test/fixtures/stylesheets/compass/css/gradients.css", + "test/fixtures/stylesheets/compass/css/image_size.css", "test/fixtures/stylesheets/compass/css/layout.css", "test/fixtures/stylesheets/compass/css/print.css", "test/fixtures/stylesheets/compass/css/reset.css", "test/fixtures/stylesheets/compass/css/utilities.css", + "test/fixtures/stylesheets/compass/images/100x150.gif", + "test/fixtures/stylesheets/compass/images/100x150.jpeg", + "test/fixtures/stylesheets/compass/images/100x150.jpg", + "test/fixtures/stylesheets/compass/images/100x150.png", + "test/fixtures/stylesheets/compass/sass/gradients.sass", + "test/fixtures/stylesheets/compass/sass/image_size.sass", "test/fixtures/stylesheets/compass/sass/layout.sass", "test/fixtures/stylesheets/compass/sass/print.sass", "test/fixtures/stylesheets/compass/sass/reset.sass", From 5230d89aba066164c7e79e3997a60e5cfffbedca Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Mon, 22 Feb 2010 00:56:48 -0800 Subject: [PATCH 28/48] Fix a ruby 1.9 bug --- lib/compass/sass_extensions/functions/image_size.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/compass/sass_extensions/functions/image_size.rb b/lib/compass/sass_extensions/functions/image_size.rb index 864b8cdc..48af6dfd 100644 --- a/lib/compass/sass_extensions/functions/image_size.rb +++ b/lib/compass/sass_extensions/functions/image_size.rb @@ -86,10 +86,10 @@ private when 0xC0..0xC3, 0xC5..0xC7, 0xC9..0xCB, 0xCD..0xCF # SOF markers length, @bits, @height, @width, components = io.readsof raise 'malformed JPEG' unless length == 8 + components * 3 - when 0xD9, 0xDA: break # EOI, SOS - when 0xFE: @comment = io.readframe # COM - when 0xE1: io.readframe # APP1, contains EXIF tag - else io.readframe # ignore frame + when 0xD9, 0xDA then break # EOI, SOS + when 0xFE then @comment = io.readframe # COM + when 0xE1 then io.readframe # APP1, contains EXIF tag + else io.readframe # ignore frame end end end From 2baaffd0132aeb9723d307710a4711bc9112840a Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Tue, 23 Feb 2010 01:41:41 -0800 Subject: [PATCH 29/48] Fix for rgba colors with the new gradient mixins. --- .../functions/gradient_support.rb | 42 +++++++++---------- .../stylesheets/compass/css/gradients.css | 8 +++- .../stylesheets/compass/sass/gradients.sass | 3 ++ 3 files changed, 30 insertions(+), 23 deletions(-) diff --git a/lib/compass/sass_extensions/functions/gradient_support.rb b/lib/compass/sass_extensions/functions/gradient_support.rb index 34dcbadf..f3b14e0d 100644 --- a/lib/compass/sass_extensions/functions/gradient_support.rb +++ b/lib/compass/sass_extensions/functions/gradient_support.rb @@ -6,10 +6,10 @@ module Compass::SassExtensions::Functions::GradientSupport self.values = values end def inspect - to_s + values.map{|v| v.inspect}.join(", ") end def to_s - values.map{|v| v.to_s}.join(", ") + inspect end end @@ -22,13 +22,13 @@ module Compass::SassExtensions::Functions::GradientSupport to_s end def to_s - s = "#{color}" + s = color.inspect.dup if stop s << " " if stop.unitless? - s << stop.times(Sass::Script::Number.new(100, ["%"])).to_s + s << stop.times(Sass::Script::Number.new(100, ["%"])).inspect else - s << stop.to_s + s << stop.inspect end end s @@ -60,7 +60,7 @@ module Compass::SassExtensions::Functions::GradientSupport # have to convert absolute units to percentages for use in color stop functions. stop = pos.stop stop = stop.div(max).times(Sass::Script::Number.new(100,["%"])) if stop.numerator_units == max.numerator_units - "color-stop(#{stop}, #{pos.color})" + "color-stop(#{stop.inspect}, #{pos.color.inspect})" end Sass::Script::String.new(color_stops.join(", ")) end @@ -129,22 +129,22 @@ module Compass::SassExtensions::Functions::GradientSupport when Sass::Script::Color ColorStop.new(arg) when Sass::Script::String - color, stop = arg.value.split(/ +/, 2) - color = Sass::Script::Parser.parse(color, 0, 0) - if stop =~ /^(\d+)?(?:\.(\d+))?(%)?$/ - integral, decimal, percent = $1, $2, $3 - number = "#{integral || 0}.#{decimal || 0}".to_f - number = number / 100 if percent - if number > 1 - raise Sass::SyntaxError, "A color stop location must be between 0#{"%" if percent} and 1#{"00%" if percent}. Got: #{stop}" + color = stop = nil + expr = Sass::Script::Parser.parse(arg.value, 0, 0) + case expr + when Sass::Script::Color + color = expr + when Sass::Script::Operation + unless expr.instance_variable_get("@operator") == :concat + raise Sass::SyntaxError, "Couldn't parse a color stop from: #{arg.value}" end - stop = Sass::Script::Number.new(number) - elsif !stop.nil? - number = Sass::Script::Parser.parse(stop, 0, 0) - unless number.is_a?(Sass::Script::Number) - raise Sass::SyntaxError, "A color stop location must be a number. Got: #{stop}" - end - stop = number + color = expr.instance_variable_get("@operand1") + stop = expr.instance_variable_get("@operand2") + when Sass::Script::Funcall + color = expr + else + puts expr.class.name + raise Sass::SyntaxError, "Couldn't parse a color stop from:: #{arg.value}" end ColorStop.new(color, stop) else diff --git a/test/fixtures/stylesheets/compass/css/gradients.css b/test/fixtures/stylesheets/compass/css/gradients.css index dcdf94b0..4f6b07ac 100644 --- a/test/fixtures/stylesheets/compass/css/gradients.css +++ b/test/fixtures/stylesheets/compass/css/gradients.css @@ -23,8 +23,8 @@ background-image: -moz-linear-gradient(top, #dddddd 0%, #cccccc 20%, #aaaaaa 100%); } .linear-7 { - background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(0%, #dddddd), color-stop(20%, #cccccc), color-stop(50.1%, #eeeeee), color-stop(100%, #aaaaaa)); - background-image: -moz-linear-gradient(top, #dddddd 0%, #cccccc 20%, #eeeeee 50.1%, #aaaaaa 100%); } + background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(0%, #dddddd), color-stop(20%, #cccccc), color-stop(60%, #eeeeee), color-stop(100%, #aaaaaa)); + background-image: -moz-linear-gradient(top, #dddddd 0%, #cccccc 20%, #eeeeee 60%, #aaaaaa 100%); } .linear-8 { background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(80%, #dddddd), color-stop(100%, #aaaaaa)); @@ -69,3 +69,7 @@ .radial-7 { background-image: -webkit-gradient(radial, 50% 50%, 0, 50% 50%, 50, color-stop(20%, #dddddd), color-stop(100%, #aaaaaa)); background-image: -moz-radial-gradient(center center, circle, #dddddd 20%, #aaaaaa 50px); } + +.alpha-linear { + background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(80%, rgba(255, 255, 255, 0)), color-stop(90%, rgba(255, 127, 127, 0.5)), color-stop(100%, rgba(255, 255, 255, 1))); + background-image: -moz-linear-gradient(top, rgba(255, 255, 255, 0) 40%, rgba(255, 127, 127, 0.5) 45%, rgba(255, 255, 255, 1) 50%); } diff --git a/test/fixtures/stylesheets/compass/sass/gradients.sass b/test/fixtures/stylesheets/compass/sass/gradients.sass index 43141bf8..8d27f4c6 100644 --- a/test/fixtures/stylesheets/compass/sass/gradients.sass +++ b/test/fixtures/stylesheets/compass/sass/gradients.sass @@ -46,3 +46,6 @@ // A centered elliptical gradient with color stops // The color stops must be relative units +radial-gradient(color_stops(#ddd 20%, #aaa 50px)) + +.alpha-linear + +linear-gradient(color_stops(rgba(255, 255, 255, 0) 40%, rgba(255, 127, 127, 0.5), rgba(255, 255, 255, 1) 50%)) \ No newline at end of file From 76c75b1d3de50bfcf91fcb3606f9c20be261b98c Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Tue, 23 Feb 2010 01:59:44 -0800 Subject: [PATCH 30/48] A better error message if a color stop list is not passed in. --- .../functions/gradient_support.rb | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/lib/compass/sass_extensions/functions/gradient_support.rb b/lib/compass/sass_extensions/functions/gradient_support.rb index f3b14e0d..f4fa9d42 100644 --- a/lib/compass/sass_extensions/functions/gradient_support.rb +++ b/lib/compass/sass_extensions/functions/gradient_support.rb @@ -54,6 +54,7 @@ module Compass::SassExtensions::Functions::GradientSupport # returns color-stop() calls for use in webkit. def grad_color_stops(color_list) + assert_list(color_list) normalize_stops!(color_list) max = color_list.values.last.stop color_stops = color_list.values.map do |pos| @@ -64,14 +65,16 @@ module Compass::SassExtensions::Functions::GradientSupport end Sass::Script::String.new(color_stops.join(", ")) end - + # returns the end position of the gradient from the color stop def grad_end_position(color_list, radial = Sass::Script::Bool.new(false)) + assert_list(color_list) default = Sass::Script::Number.new(100) grad_position(color_list, Sass::Script::Number.new(color_list.values.size), default, radial) end def grad_position(color_list, index, default, radial = Sass::Script::Bool.new(false)) + assert_list(color_list) stop = color_list.values[index.value - 1].stop if stop && radial.to_bool orig_stop = stop @@ -129,26 +132,28 @@ module Compass::SassExtensions::Functions::GradientSupport when Sass::Script::Color ColorStop.new(arg) when Sass::Script::String + # We get a string as the result of concatenation + # So we have to reparse the expression color = stop = nil expr = Sass::Script::Parser.parse(arg.value, 0, 0) case expr when Sass::Script::Color color = expr + when Sass::Script::Funcall + color = expr when Sass::Script::Operation unless expr.instance_variable_get("@operator") == :concat + # This should never happen. raise Sass::SyntaxError, "Couldn't parse a color stop from: #{arg.value}" end color = expr.instance_variable_get("@operand1") stop = expr.instance_variable_get("@operand2") - when Sass::Script::Funcall - color = expr else - puts expr.class.name - raise Sass::SyntaxError, "Couldn't parse a color stop from:: #{arg.value}" + raise Sass::SyntaxError, "Couldn't parse a color stop from: #{arg.value}" end ColorStop.new(color, stop) else - raise Sass::SyntaxError, "Not a valid color stop: #{arg}" + raise Sass::SyntaxError, "Not a valid color stop: #{arg}" end end) end @@ -182,5 +187,9 @@ module Compass::SassExtensions::Functions::GradientSupport end nil end + def assert_list(value) + return if value.is_a?(List) + raise ArgumentError.new("#{value.inspect} is not a list of color stops. Expected: color_stops( ?, ...)") + end end end From 8dba8031a9e4a8aa75205ecf88a48929c3c7884a Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Tue, 23 Feb 2010 02:00:33 -0800 Subject: [PATCH 31/48] Version Bump --- VERSION.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION.yml b/VERSION.yml index c5bd6169..03685e02 100644 --- a/VERSION.yml +++ b/VERSION.yml @@ -2,4 +2,4 @@ :patch: 0 :major: 0 :minor: 10 -:build: pre6 +:build: pre7 From e3b0b06eda29c0fe179797f0f47d05d47cb0702c Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Tue, 23 Feb 2010 02:00:49 -0800 Subject: [PATCH 32/48] Regenerated gemspec for version 0.10.0.pre7 --- compass.gemspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compass.gemspec b/compass.gemspec index f36ba06c..7a046cff 100644 --- a/compass.gemspec +++ b/compass.gemspec @@ -5,11 +5,11 @@ Gem::Specification.new do |s| s.name = %q{compass} - s.version = "0.10.0.pre6" + s.version = "0.10.0.pre7" s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version= s.authors = ["Chris Eppstein"] - s.date = %q{2010-02-22} + s.date = %q{2010-02-23} s.default_executable = %q{compass} s.description = %q{Compass is a Sass-based Stylesheet Framework that streamlines the creation and maintainance of CSS.} s.email = %q{chris@eppsteins.net} From 282fd1f30dadb9efb60471aece83818a49dea721 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Tue, 23 Feb 2010 02:00:56 -0800 Subject: [PATCH 33/48] Record current revision for release. --- REVISION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/REVISION b/REVISION index ce685447..de274b89 100644 --- a/REVISION +++ b/REVISION @@ -1 +1 @@ -9503512782eba7e387ba0dec14e5cfe1f3c0f22b \ No newline at end of file +e3b0b06eda29c0fe179797f0f47d05d47cb0702c \ No newline at end of file From c3f887ff51fa8154d89e95c629c2257e7bd0cdf0 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Tue, 23 Feb 2010 13:12:22 -0800 Subject: [PATCH 34/48] [Rails] Fix rails boot sequence in Rails 2.3.x environments. --- lib/compass/app_integration/rails/runtime.rb | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/lib/compass/app_integration/rails/runtime.rb b/lib/compass/app_integration/rails/runtime.rb index d1a5ed5b..a3ac8dfa 100644 --- a/lib/compass/app_integration/rails/runtime.rb +++ b/lib/compass/app_integration/rails/runtime.rb @@ -1,12 +1,18 @@ unless defined?(Compass::RAILS_LOADED) Compass::RAILS_LOADED = true - - if ActionPack::VERSION::MAJOR >= 3 - # figure something out so image_path works with rails integration - else - %w(action_controller sass_plugin urls).each do |lib| - require "compass/app_integration/rails/actionpack2/#{lib}" + begin + require 'action_pack/version' + if ActionPack::VERSION::MAJOR >= 3 + # TODO figure something out so image_path works with rails integration + else + %w(action_controller sass_plugin urls).each do |lib| + require "compass/app_integration/rails/actionpack2/#{lib}" + end end + rescue LoadError => e + $stderr.puts "Compass could not access the rails environment." + rescue NameError => e + $stderr.puts "Compass could not access the rails environment." end # Wierd that this has to be re-included to pick up sub-modules. Ruby bug? From b497eae5f7e9cc7b30d5daf3787849bce566882e Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Tue, 23 Feb 2010 13:13:15 -0800 Subject: [PATCH 35/48] Version bump to .pre8 --- VERSION.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION.yml b/VERSION.yml index 03685e02..a81c9fbb 100644 --- a/VERSION.yml +++ b/VERSION.yml @@ -2,4 +2,4 @@ :patch: 0 :major: 0 :minor: 10 -:build: pre7 +:build: pre8 From 8327f633ea30490b9a21c1bc514e05ca3c1d4122 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Tue, 23 Feb 2010 13:13:41 -0800 Subject: [PATCH 36/48] Regenerated gemspec for version 0.10.0.pre8 --- compass.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compass.gemspec b/compass.gemspec index 7a046cff..6921d992 100644 --- a/compass.gemspec +++ b/compass.gemspec @@ -5,7 +5,7 @@ Gem::Specification.new do |s| s.name = %q{compass} - s.version = "0.10.0.pre7" + s.version = "0.10.0.pre8" s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version= s.authors = ["Chris Eppstein"] From 6169ec56b31326e56f37ebeb65c6dfda9e477121 Mon Sep 17 00:00:00 2001 From: Matt Garrett Date: Fri, 26 Feb 2010 10:38:56 -0600 Subject: [PATCH 37/48] Fixed a typo in the inline list utility. --- .../stylesheets/compass/utilities/lists/_inline_list.sass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frameworks/compass/stylesheets/compass/utilities/lists/_inline_list.sass b/frameworks/compass/stylesheets/compass/utilities/lists/_inline_list.sass index 88ea604f..7950c836 100644 --- a/frameworks/compass/stylesheets/compass/utilities/lists/_inline_list.sass +++ b/frameworks/compass/stylesheets/compass/utilities/lists/_inline_list.sass @@ -10,7 +10,7 @@ padding: 0px display: inline -// makes an inlin list that is comma delimited. +// makes an inline list that is comma delimited. // use of this recipe is not recommended at this time due to browser support issues. // // use of :content and :after is not fully supported in all browsers. From eba35a2944f401575c46899acedb8f2dc2b26131 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Fri, 5 Mar 2010 12:27:04 -0800 Subject: [PATCH 38/48] [Compass Core] Silence a deprecation warning. --- .../compass/stylesheets/compass/utilities/general/_min.sass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frameworks/compass/stylesheets/compass/utilities/general/_min.sass b/frameworks/compass/stylesheets/compass/utilities/general/_min.sass index 5f454547..c8e14eba 100644 --- a/frameworks/compass/stylesheets/compass/utilities/general/_min.sass +++ b/frameworks/compass/stylesheets/compass/utilities/general/_min.sass @@ -13,5 +13,5 @@ // @private This mixin is not meant to be used directly. =hacked-minimum(!property, !value) min-#{!property}= !value - +bang-hack(!property, !value, 'auto') + +bang-hack(!property, !value, "auto") From f7b729fa60838db0452ada031714df75213560f5 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Sat, 6 Mar 2010 14:24:54 -0800 Subject: [PATCH 39/48] Try to fix a test failure that only happens on RunCodeRun. --- Rakefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 3fc95592..1fe462cc 100644 --- a/Rakefile +++ b/Rakefile @@ -3,11 +3,13 @@ if ENV['RUN_CODE_RUN'] if File.directory?("haml") Dir.chdir("haml") do sh "git", "fetch" - sh "git", "reset", "--hard", "origin/stable" end else sh "git", "clone", "git://github.com/nex3/haml.git" end + Dir.chdir("haml") do + sh "git", "reset", "--hard", "origin/stable" + end $LOAD_PATH.unshift "haml/lib" end From 7f008f4ea0363ea9ce1e5a8b143111f96a8ea557 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Sat, 6 Mar 2010 15:47:54 -0800 Subject: [PATCH 40/48] [Compass Core] Fix a ruby 1.9 bug in the image_size helper functions for jpeg images. --- lib/compass/sass_extensions/functions/image_size.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/compass/sass_extensions/functions/image_size.rb b/lib/compass/sass_extensions/functions/image_size.rb index 48af6dfd..02a07539 100644 --- a/lib/compass/sass_extensions/functions/image_size.rb +++ b/lib/compass/sass_extensions/functions/image_size.rb @@ -68,19 +68,19 @@ private private def examine(io) - raise 'malformed JPEG' unless io.getc == 0xFF && io.getc == 0xD8 # SOI - class << io - def readint; (readchar << 8) + readchar; end + def readint; (readbyte << 8) + readbyte; end def readframe; read(readint - 2); end - def readsof; [readint, readchar, readint, readint, readchar]; end + def readsof; [readint, readbyte, readint, readint, readbyte]; end def next - c = readchar while c != 0xFF - c = readchar while c == 0xFF + c = readbyte while c != 0xFF + c = readbyte while c == 0xFF c end end + raise 'malformed JPEG!' unless io.readbyte == 0xFF && io.readbyte == 0xD8 # SOI + while marker = io.next case marker when 0xC0..0xC3, 0xC5..0xC7, 0xC9..0xCB, 0xCD..0xCF # SOF markers From edd39fdcd95107bbc543400f449fe766ff63ebfa Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Sat, 6 Mar 2010 15:57:07 -0800 Subject: [PATCH 41/48] Version bump for v0.10.pre9 --- VERSION.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION.yml b/VERSION.yml index a81c9fbb..e494abb0 100644 --- a/VERSION.yml +++ b/VERSION.yml @@ -2,4 +2,4 @@ :patch: 0 :major: 0 :minor: 10 -:build: pre8 +:build: pre9 From f9b6b1274915c5ac457cc4168686758440c773b8 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Sat, 6 Mar 2010 16:03:02 -0800 Subject: [PATCH 42/48] Update changelog for release. --- CHANGELOG.markdown | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CHANGELOG.markdown b/CHANGELOG.markdown index 909d74c8..edb03654 100644 --- a/CHANGELOG.markdown +++ b/CHANGELOG.markdown @@ -1,6 +1,20 @@ COMPASS CHANGELOG ================= +0.10.0.pre9 (March 6, 2010) +--------------------------- + +* Fix a ruby 1.9 bug in the image_size helper functions for jpeg images. +* Silence a deprecation warning. + + +0.10.0.pre7 & 0.10.0.pre8 (February 23, 2010) +--------------------------------------------- + +* Rails 3 compatibility fixes +* Fix for rgba colors with the new gradient mixins +* A better error message if a color stop list is not passed in to the gradient mixins. + 0.10.0.pre6 (February 22, 2010) ------------------------------- From f3eb23954dde3f016edcdb542ec2051ece3694a3 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Sat, 6 Mar 2010 16:18:39 -0800 Subject: [PATCH 43/48] Regenerated gemspec for version 0.10.0.pre9 --- compass.gemspec | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/compass.gemspec b/compass.gemspec index 6921d992..ed47b52c 100644 --- a/compass.gemspec +++ b/compass.gemspec @@ -5,11 +5,11 @@ Gem::Specification.new do |s| s.name = %q{compass} - s.version = "0.10.0.pre8" + s.version = "0.10.0.pre9" s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version= s.authors = ["Chris Eppstein"] - s.date = %q{2010-02-23} + s.date = %q{2010-03-06} s.default_executable = %q{compass} s.description = %q{Compass is a Sass-based Stylesheet Framework that streamlines the creation and maintainance of CSS.} s.email = %q{chris@eppsteins.net} @@ -499,7 +499,6 @@ Gem::Specification.new do |s| "test/test_helper.rb", "test/test_rails_helper.rb" ] - s.has_rdoc = false s.homepage = %q{http://compass-style.org} s.rdoc_options = ["--charset=UTF-8"] s.require_paths = ["lib"] From df5c21a725f64055fbc7a923aa31f46aa5630e34 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Sat, 6 Mar 2010 16:18:46 -0800 Subject: [PATCH 44/48] Record current revision for release. --- REVISION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/REVISION b/REVISION index de274b89..be43a6bc 100644 --- a/REVISION +++ b/REVISION @@ -1 +1 @@ -e3b0b06eda29c0fe179797f0f47d05d47cb0702c \ No newline at end of file +f3eb23954dde3f016edcdb542ec2051ece3694a3 \ No newline at end of file From ace0450774daa258936efcaa6f0b18ba02a4a439 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Sat, 6 Mar 2010 16:27:12 -0800 Subject: [PATCH 45/48] Fix a bug in 1.8.6 where readbyte is not defined. --- lib/compass/sass_extensions/functions/image_size.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/compass/sass_extensions/functions/image_size.rb b/lib/compass/sass_extensions/functions/image_size.rb index 02a07539..c143faa8 100644 --- a/lib/compass/sass_extensions/functions/image_size.rb +++ b/lib/compass/sass_extensions/functions/image_size.rb @@ -69,6 +69,11 @@ private private def examine(io) class << io + unless method_defined?(:readbyte) + def readbyte + getc + end + end def readint; (readbyte << 8) + readbyte; end def readframe; read(readint - 2); end def readsof; [readint, readbyte, readint, readint, readbyte]; end From 2b5650ad8d9b14830937f644d06eb2d1014257af Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Sat, 6 Mar 2010 17:46:44 -0800 Subject: [PATCH 46/48] Release Candidate 1 --- VERSION.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION.yml b/VERSION.yml index e494abb0..83aa52b7 100644 --- a/VERSION.yml +++ b/VERSION.yml @@ -2,4 +2,4 @@ :patch: 0 :major: 0 :minor: 10 -:build: pre9 +:build: rc1 From 98908c49780d58a43681c484bb36c6ace0cc2d85 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Sat, 6 Mar 2010 17:47:12 -0800 Subject: [PATCH 47/48] Regenerated gemspec for version 0.10.0.rc1 --- compass.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compass.gemspec b/compass.gemspec index ed47b52c..822bcd08 100644 --- a/compass.gemspec +++ b/compass.gemspec @@ -5,7 +5,7 @@ Gem::Specification.new do |s| s.name = %q{compass} - s.version = "0.10.0.pre9" + s.version = "0.10.0.rc1" s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version= s.authors = ["Chris Eppstein"] From fefea4373ab47849d1c038401e2ebf41fe6a39a2 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Sat, 6 Mar 2010 17:47:20 -0800 Subject: [PATCH 48/48] Record current revision for release. --- REVISION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/REVISION b/REVISION index be43a6bc..31984d1e 100644 --- a/REVISION +++ b/REVISION @@ -1 +1 @@ -f3eb23954dde3f016edcdb542ec2051ece3694a3 \ No newline at end of file +98908c49780d58a43681c484bb36c6ace0cc2d85 \ No newline at end of file