Ejemplo n.º 1
0
 public function operate($op, $other)
 {
     $result = array();
     if (!$other instanceof \Less\Node\Color) {
         $other = $other->toColor();
     }
     for ($c = 0; $c < 3; $c++) {
         $result[$c] = \Less\Environment::operate($op, $this->rgb[$c], $other->rgb[$c]);
     }
     return new \Less\Node\Color($result, $this->alpha + $other->alpha);
 }
Ejemplo n.º 2
0
 public function operate($op, $other)
 {
     return new \Less\Node\Dimension(\Less\Environment::operate($op, $this->value, $other->value), $this->unit ?: $other->unit);
 }