From 55b049e1fac061f5303d595db3643770404504e7 Mon Sep 17 00:00:00 2001 From: Mario Kuroir Ricalde Date: Wed, 28 Dec 2011 02:57:00 -0600 Subject: [PATCH 01/11] Improves index/functions - adds links to sass functions and differentiate them from Compass ones. --- doc-src/content/index/functions.haml | 20 +++++++++++++++----- doc-src/lib/stylesheets.rb | 8 +++++++- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/doc-src/content/index/functions.haml b/doc-src/content/index/functions.haml index 3db82d99..03b28450 100644 --- a/doc-src/content/index/functions.haml +++ b/doc-src/content/index/functions.haml @@ -5,7 +5,7 @@ body_id: home --- %article %h1#logo Sass Based Functions - + - all_functions.sorted_and_grouped_by_name{|f| f.last.name }.each do |(group, functions)| %h3= group %ul @@ -13,12 +13,22 @@ body_id: home %li %a{:href=>"#{i.path}#function-#{f.name}"}= f.sass_signature(:html) + - sass_function_list = [] %h1#logo All Ruby Based Functions + %h3 Compass Functions %ul - Sass::Script::Functions.public_instance_methods.sort_by{|m| m.to_s}.each do |m| - %li - - name = m.to_s.gsub("_","-") + - name = m.to_s.gsub("_","-") + - unless name =~ /^\-compass/ # Private Fuctions! - if i = item_for_function_name(name) - %a{:href=>"#{i.path}##{name}"}= name + %li + %a{:href=>"#{i.path}##{name}"}= name + - elsif sass_functions().include? m + - sass_function_list << '%s' % [m.to_s, name] - else - = name \ No newline at end of file + %li + = name + %h3 Sass Functions + %ul + - sass_function_list.each do |m| + %li= m \ No newline at end of file diff --git a/doc-src/lib/stylesheets.rb b/doc-src/lib/stylesheets.rb index 6fa56b6b..4bd2e6f1 100644 --- a/doc-src/lib/stylesheets.rb +++ b/doc-src/lib/stylesheets.rb @@ -60,7 +60,7 @@ def import_paths File.dirname(@item[:stylesheet])), @item[:stylesheet]["/"] ? File.dirname(@item[:stylesheet]) : ""] end - + paths += Compass::Frameworks::ALL.inject([]) {|m, f| m << f.stylesheets_directory}.map!{|p|[p, '']} paths end @@ -183,6 +183,12 @@ def all_functions end end +# Sass Only Functions from 3.1.10 (Brainy Betty) +# Not as elegant, but does the trick. +def sass_functions + [:rgb, :rgba, :hsl, :hsla, :red, :green, :blue, :hue, :saturation, :lightness, :alpha, :opacity, :opacify, :fade_in, :transparentize, :fade_out, :lighten, :darken, :saturate, :desaturate, :adjust_hue, :adjust_color, :scale_color, :change_color, :mix, :grayscale, :complement, :invert, :unquote, :quote, :type_of, :unit, :unitless, :comparable, :percentage, :round, :ceil, :floor, :abs, :length, :nth, :join, :append, :zip, :index, :if] +end + def example_items @site.cached("examples") do @items.select do |i| From 25b0defa263dbe23ddf61bd697e694a1e9035db0 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Wed, 4 Jan 2012 13:01:03 -0800 Subject: [PATCH 02/11] Fix a gemspec issue. --- compass.gemspec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compass.gemspec b/compass.gemspec index d6c1194e..0265175c 100644 --- a/compass.gemspec +++ b/compass.gemspec @@ -3,7 +3,8 @@ require File.join(path, 'compass/version') Gem::Specification.new do |gemspec| gemspec.name = "compass" - gemspec.version = Compass::VERSION # Update the VERSION.yml file to set this. + gemspec.date = Date.today + gemspec.version = Compass::VERSION # Update VERSION.yml file to set this. gemspec.description = "Compass is a Sass-based Stylesheet Framework that streamlines the creation and maintainance of CSS." gemspec.homepage = "http://compass-style.org" gemspec.authors = ["Chris Eppstein", "Eric A. Meyer", "Brandon Mathis", "Nico Hagenburger", "Scott Davis"] From 31e77fe2aef61653dc1a9dffb2340d0293586a6c Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Thu, 5 Jan 2012 08:40:32 -0800 Subject: [PATCH 03/11] Version bump for gemspec error --- VERSION.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION.yml b/VERSION.yml index 79bf3185..38ecce4f 100644 --- a/VERSION.yml +++ b/VERSION.yml @@ -1,5 +1,5 @@ --- :major: 0 :minor: 11 -:patch: 6 +:patch: 7 :name: Antares From 1f1f4e28324cf398c3fc2332a00b0a6c2d95edc5 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Wed, 4 Jan 2012 13:01:03 -0800 Subject: [PATCH 04/11] Fix a gemspec issue. --- compass.gemspec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compass.gemspec b/compass.gemspec index d6c1194e..0265175c 100644 --- a/compass.gemspec +++ b/compass.gemspec @@ -3,7 +3,8 @@ require File.join(path, 'compass/version') Gem::Specification.new do |gemspec| gemspec.name = "compass" - gemspec.version = Compass::VERSION # Update the VERSION.yml file to set this. + gemspec.date = Date.today + gemspec.version = Compass::VERSION # Update VERSION.yml file to set this. gemspec.description = "Compass is a Sass-based Stylesheet Framework that streamlines the creation and maintainance of CSS." gemspec.homepage = "http://compass-style.org" gemspec.authors = ["Chris Eppstein", "Eric A. Meyer", "Brandon Mathis", "Nico Hagenburger", "Scott Davis"] From 2bd1775d7197c8080b348f1d8f7af00d7293c8eb Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Thu, 5 Jan 2012 08:50:42 -0800 Subject: [PATCH 05/11] Version bump --- VERSION.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION.yml b/VERSION.yml index 0ffe9867..efa69d5f 100644 --- a/VERSION.yml +++ b/VERSION.yml @@ -2,5 +2,5 @@ :major: 0 :minor: 12 :state: alpha -:build: 3 +:build: 4 :name: Alnilam From bffba483754cb9381fa51efd8e2a1f0482a21ac6 Mon Sep 17 00:00:00 2001 From: Scott Davis Date: Fri, 6 Jan 2012 14:21:05 -0500 Subject: [PATCH 06/11] fixed rouge puts --- lib/compass/commands/update_project.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/compass/commands/update_project.rb b/lib/compass/commands/update_project.rb index 66098d34..0d8f5505 100644 --- a/lib/compass/commands/update_project.rb +++ b/lib/compass/commands/update_project.rb @@ -67,7 +67,6 @@ module Compass if options.include?(:debug_info) && options[:debug_info] compiler_opts[:sass][:debug_info] = options.delete(:debug_info) end - puts compiler_opts.inspect compiler_opts end From 317999bc4efd076848eaa7a8348cee54352c7c58 Mon Sep 17 00:00:00 2001 From: ShishKabab Date: Sun, 8 Jan 2012 13:54:58 +0100 Subject: [PATCH 07/11] Fix wrong degree to radian conversion in trig function. Might break some stylesheets for users so proceed with caution! --- lib/compass/sass_extensions/functions/trig.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/compass/sass_extensions/functions/trig.rb b/lib/compass/sass_extensions/functions/trig.rb index 95c38508..8e87ab4b 100644 --- a/lib/compass/sass_extensions/functions/trig.rb +++ b/lib/compass/sass_extensions/functions/trig.rb @@ -19,7 +19,7 @@ module Compass::SassExtensions::Functions::Trig private def trig(operation, number) if number.numerator_units == ["deg"] && number.denominator_units == [] - Sass::Script::Number.new(Math.send(operation, Math::PI * number.value / 360)) + Sass::Script::Number.new(Math.send(operation, Math::PI * number.value / 180)) else Sass::Script::Number.new(Math.send(operation, number.value), number.numerator_units, number.denominator_units) end From df6524ef42ba058b437ce74b10512d262f6468ce Mon Sep 17 00:00:00 2001 From: Ryan Frederick Date: Mon, 9 Jan 2012 23:51:38 -0800 Subject: [PATCH 08/11] =?UTF-8?q?Fix=20typo=20in=20=E2=80=A6help/turorials?= =?UTF-8?q?/contributing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc-src/content/help/tutorials/contributing.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc-src/content/help/tutorials/contributing.markdown b/doc-src/content/help/tutorials/contributing.markdown index 05cb1e4a..9e40ff6a 100644 --- a/doc-src/content/help/tutorials/contributing.markdown +++ b/doc-src/content/help/tutorials/contributing.markdown @@ -10,7 +10,7 @@ Contributing Stylesheets to Compass Thank you for your interest in contributing to Compass. Our goal is to make it as easy as we can for you to contribute changes to compass -- So if there's something here that -seems harder than it aught to be, please let us know. +seems harder than it ought to be, please let us know. If you find a bug **in this document**, you are bound to contribute a fix. Stop reading now if you do not wish to abide by this rule. From 236efc264b233a0b6a540928798daaa5f05a3604 Mon Sep 17 00:00:00 2001 From: Eric Meyer Date: Fri, 13 Jan 2012 15:49:06 -0700 Subject: [PATCH 09/11] update background-clip browser support and add tests. --- .../compass/stylesheets/compass/css3/_background-clip.scss | 6 +++--- test/fixtures/stylesheets/compass/css/background-clip.css | 4 ++++ test/fixtures/stylesheets/compass/sass/background-clip.scss | 3 +++ 3 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 test/fixtures/stylesheets/compass/css/background-clip.css create mode 100644 test/fixtures/stylesheets/compass/sass/background-clip.scss diff --git a/frameworks/compass/stylesheets/compass/css3/_background-clip.scss b/frameworks/compass/stylesheets/compass/css3/_background-clip.scss index 47a78f64..ec3ac342 100644 --- a/frameworks/compass/stylesheets/compass/css3/_background-clip.scss +++ b/frameworks/compass/stylesheets/compass/css3/_background-clip.scss @@ -35,9 +35,9 @@ $default-background-clip: padding-box !default; @include experimental(background-clip, $clip, not -moz, not -webkit, - -o, - -ms, - -khtml, + not -o, + not -ms, + not -khtml, official ); } diff --git a/test/fixtures/stylesheets/compass/css/background-clip.css b/test/fixtures/stylesheets/compass/css/background-clip.css new file mode 100644 index 00000000..a6f2e520 --- /dev/null +++ b/test/fixtures/stylesheets/compass/css/background-clip.css @@ -0,0 +1,4 @@ +.background-clip { + -moz-background-clip: border; + -webkit-background-clip: border; + background-clip: border-box; } diff --git a/test/fixtures/stylesheets/compass/sass/background-clip.scss b/test/fixtures/stylesheets/compass/sass/background-clip.scss new file mode 100644 index 00000000..0716dabd --- /dev/null +++ b/test/fixtures/stylesheets/compass/sass/background-clip.scss @@ -0,0 +1,3 @@ +@import "compass/css3/background-clip"; + +.background-clip { @include background-clip('border-box'); } \ No newline at end of file From 0642deebc6a49fcad7d2422bdc8fbdd1d5b018c6 Mon Sep 17 00:00:00 2001 From: Eric Meyer Date: Fri, 13 Jan 2012 16:13:22 -0700 Subject: [PATCH 10/11] seems khtml might actually need the prefix for background-clip --- .../compass/stylesheets/compass/css3/_background-clip.scss | 2 +- test/fixtures/stylesheets/compass/css/background-clip.css | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/frameworks/compass/stylesheets/compass/css3/_background-clip.scss b/frameworks/compass/stylesheets/compass/css3/_background-clip.scss index ec3ac342..6ce473f6 100644 --- a/frameworks/compass/stylesheets/compass/css3/_background-clip.scss +++ b/frameworks/compass/stylesheets/compass/css3/_background-clip.scss @@ -37,7 +37,7 @@ $default-background-clip: padding-box !default; not -webkit, not -o, not -ms, - not -khtml, + -khtml, official ); } diff --git a/test/fixtures/stylesheets/compass/css/background-clip.css b/test/fixtures/stylesheets/compass/css/background-clip.css index a6f2e520..683b7e12 100644 --- a/test/fixtures/stylesheets/compass/css/background-clip.css +++ b/test/fixtures/stylesheets/compass/css/background-clip.css @@ -1,4 +1,5 @@ .background-clip { -moz-background-clip: border; -webkit-background-clip: border; + -khtml-background-clip: border-box; background-clip: border-box; } From 8c84869b0b6bc5396e264fea15c71d4e346ac5d0 Mon Sep 17 00:00:00 2001 From: Scott Davis Date: Wed, 18 Jan 2012 20:02:00 -0500 Subject: [PATCH 11/11] fixed tests --- .../fixtures/stylesheets/compass/css/background-clip.css | 9 +++++++-- .../stylesheets/compass/sass/background-clip.scss | 7 ++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/test/fixtures/stylesheets/compass/css/background-clip.css b/test/fixtures/stylesheets/compass/css/background-clip.css index 683b7e12..45c9574d 100644 --- a/test/fixtures/stylesheets/compass/css/background-clip.css +++ b/test/fixtures/stylesheets/compass/css/background-clip.css @@ -1,5 +1,10 @@ .background-clip { - -moz-background-clip: border; -webkit-background-clip: border; - -khtml-background-clip: border-box; + -moz-background-clip: border; background-clip: border-box; } + +.background-clip-khtml { + -webkit-background-clip: border; + -moz-background-clip: border; + -khtml-background-clip: border-box; + background-clip: border-box; } \ No newline at end of file diff --git a/test/fixtures/stylesheets/compass/sass/background-clip.scss b/test/fixtures/stylesheets/compass/sass/background-clip.scss index 0716dabd..03fd4cc6 100644 --- a/test/fixtures/stylesheets/compass/sass/background-clip.scss +++ b/test/fixtures/stylesheets/compass/sass/background-clip.scss @@ -1,3 +1,8 @@ @import "compass/css3/background-clip"; -.background-clip { @include background-clip('border-box'); } \ No newline at end of file +.background-clip { @include background-clip('border-box'); } + +.background-clip-khtml { + $experimental-support-for-khtml:true; + @include background-clip('border-box'); +} \ No newline at end of file