diff --git a/lib/compass/sass_extensions/functions/gradient_support.rb b/lib/compass/sass_extensions/functions/gradient_support.rb index d43c1e51..c0882907 100644 --- a/lib/compass/sass_extensions/functions/gradient_support.rb +++ b/lib/compass/sass_extensions/functions/gradient_support.rb @@ -14,6 +14,9 @@ module Compass::SassExtensions::Functions::GradientSupport def to_s values.map {|v| v.to_s }.join(join_with) end + def size + values.size + end end class SpaceList < List @@ -317,6 +320,10 @@ module Compass::SassExtensions::Functions::GradientSupport SpaceList.new(*values) end + def _compass_list_size(list) + Sass::Script::Number.new(list.size) + end + # Get the nth value from a list def _compass_nth(list, place) if place.value == "last"