compass/src/test/testData/gems/compass-0.13.alpha.2/lib/compass/sass_extensions/functions/gradient_support.rb
# given a position list, return a corresponding position in percents
# otherwise, returns the original argument
given a position list, return a corresponding position in percents
otherwise, returns the original argument
given a position list return a corresponding position in percents otherwise returns the original argument
def linear_gradient(position_or_angle, *color_stops)
      if color_stop?(position_or_angle)
        color_stops.unshift(position_or_angle)
        position_or_angle = nil
      elsif list_of_color_stops?(position_or_angle)
        color_stops = position_or_angle.value + color_stops
        position_or_angle = nil
      end
      position_or_angle = nil if position_or_angle && !position_or_angle.to_bool
      if color_stops.size == 1 && (stops = list_of_color_stops?(color_stops.first))
        color_stops = stops
      end
      LinearGradient.new(position_or_angle, send(:color_stops, *color_stops))
    end
def linear_gradient ( position_or_angle , * color_stops ) if color_stop? ( position_or_angle ) color_stops . unshift ( position_or_angle ) position_or_angle = nil elsif list_of_color_stops? ( position_or_angle ) color_stops = position_or_angle . value + color_stops position_or_angle = nil end position_or_angle = nil if position_or_angle && ! position_or_angle . to_bool if color_stops . size == 1 && ( stops = list_of_color_stops? ( color_stops . first ) ) color_stops = stops end LinearGradient . new ( position_or_angle , send ( :color_stops , * color_stops ) ) end
given a position list, return a corresponding position in percents
otherwise, returns the original argument
given a position list return a corresponding position in percents otherwise returns the original argument
# Support legacy use of the color-stops() function
position_or_angle
color_stops