Sass::Script::Literal
# File lib/compass/sass_extensions/functions/gradient_support.rb, line 143 def initialize(position_or_angle, color_stops) unless color_stops.value.size >= 2 raise Sass::SyntaxError, "At least two color stops are required for a linear-gradient" end self.position_or_angle = position_or_angle self.color_stops = color_stops end
# File lib/compass/sass_extensions/functions/gradient_support.rb, line 139 def children [color_stops, position_or_angle].compact end
# File lib/compass/sass_extensions/functions/gradient_support.rb, line 183 def to_css2(options = self.options) Sass::Script::String.new("") end
Output the original webkit gradient syntax
# File lib/compass/sass_extensions/functions/gradient_support.rb, line 164 def to_owg(options = self.options) args = [] args << grad_point(position_or_angle || Sass::Script::String.new("top")) args << linear_end_position(position_or_angle, color_stops) args << grad_color_stops(color_stops) args.each{|a| a.options = options} Sass::Script::String.new("-webkit-gradient(linear, #{args.join(', ')})") end
# File lib/compass/sass_extensions/functions/gradient_support.rb, line 177 def to_pie(options = self.options) # PIE just uses the standard rep, but the property is prefixed so # the presence of this attribute helps flag when to render a special rule. Sass::Script::String.new to_s(options) end
Generated with the Darkfish Rdoc Generator 2.