You are here

public function SassColour::op_shiftl in Sassy 7.3

Same name and namespace in other branches
  1. 7 phamlp/sass/script/literals/SassColour.php \SassColour::op_shiftl()

Colour bitwise Shift Left

Parameters

sassNumber amount to shift left by:

Return value

sassColour the colour result

Overrides SassLiteral::op_shiftl

File

phpsass/script/literals/SassColour.php, line 561

Class

SassColour
SassColour class. A SassScript object representing a CSS colour.

Code

public function op_shiftl($other) {
  if (!$other instanceof SassNumber || !$other
    ->isUnitless()) {
    throw new SassColourException('Number must be a unitless number', SassScriptParser::$context->node);
  }
  $this->red = $this
    ->getRed() << $other->value;
  $this->green = $this
    ->getGreen() << $other->value;
  $this->blue = $this
    ->getBlue() << $other->value;
  return $this;
}