Method: Sass::Script::Value::Color#minus

Defined in:
lib/sass/script/value/color.rb

#minus(other) ⇒ Color

The SassScript - operation. Its functionality depends on the type of its argument:

Number : Subtracts the number from each of the RGB color channels.

Sass::Script::Value::Color : Subtracts each of the other color's RGB color channels from this color's.

Sass::Script::Value : See Base#minus.

Parameters:

  • other (Value)

    The right-hand side of the operator

Returns:

  • (Color)

    The resulting color

Raises:



486
487
488
489
490
491
492
# File 'lib/sass/script/value/color.rb', line 486

def minus(other)
  if other.is_a?(Sass::Script::Value::Number) || other.is_a?(Sass::Script::Value::Color)
    piecewise(other, :-)
  else
    super
  end
end