# File lib/compass/core/sass_extensions/functions/gradient_support.rb, line 280 def initialize(position, shape_and_size, color_stops) unless color_stops.value.size >= 2 raise Sass::SyntaxError, "At least two color stops are required for a radial-gradient" end if angle?(position) raise Sass::SyntaxError, "CSS no longer allows angles in radial-gradients." end self.position = position self.shape_and_size = shape_and_size self.color_stops = color_stops end
# File lib/compass/core/sass_extensions/functions/gradient_support.rb, line 362 def array_to_s(array, opts) if array.is_a?(Sass::Script::Value::List) array.to_s else l = list(array, :space) l.options = opts l.to_s end end
# File lib/compass/core/sass_extensions/functions/gradient_support.rb, line 276 def children [color_stops, position, shape_and_size].compact end
# File lib/compass/core/sass_extensions/functions/gradient_support.rb, line 333 def new_standard_arguments(options = self.options) if shape_and_size "#{array_to_s(shape_and_size, options)} at #{array_to_s(position, options)}, #{array_to_s(color_stops, options)}" elsif position "#{array_to_s(position, options)}, #{array_to_s(color_stops, options)}" else array_to_s(color_stops, options) end end
# File lib/compass/core/sass_extensions/functions/gradient_support.rb, line 343 def old_standard_arguments(options = self.options) if shape_and_size "#{array_to_s(position, options)}, #{array_to_s(shape_and_size, options)}, #{array_to_s(color_stops, options)}" elsif position "#{array_to_s(position, options)}, #{array_to_s(color_stops, options)}" else array_to_s(color_stops, options) end end
# File lib/compass/core/sass_extensions/functions/gradient_support.rb, line 300 def supports?(aspect) # I don't know how to support radial old webkit gradients (owg) if %(owg).include?(aspect) false else super end end
# File lib/compass/core/sass_extensions/functions/gradient_support.rb, line 358 def to_css2(options = self.options) null end
# File lib/compass/core/sass_extensions/functions/gradient_support.rb, line 319 def to_moz(options = self.options) s = "-moz-radial-gradient(" s << old_standard_arguments(options) s << ")" identifier(s) end
# File lib/compass/core/sass_extensions/functions/gradient_support.rb, line 326 def to_official s = "radial-gradient(" s << new_standard_arguments(options) s << ")" identifier(s) end
# File lib/compass/core/sass_extensions/functions/gradient_support.rb, line 292 def to_s(options = self.options) to_official.to_s end
# File lib/compass/core/sass_extensions/functions/gradient_support.rb, line 296 def to_s_prefixed(options = self.options) to_s(options) end
Generated with the Darkfish Rdoc Generator 2.