/** * @see ILess_Node::generateCSS */ public function generateCSS(ILess_Environment $env, ILess_Output $output) { if ($env->strictUnits && !$this->unit->isSingular()) { throw new ILess_Exception_Compiler(sprintf('Multiple units in dimension. Correct the units or use the unit function. Bad unit: %s', $this->unit->toString())); } $value = $this->value; // Zero values doesn't need a unit if ($env->compress) { if ($value == 0 && $this->unit->isLength()) { $output->add($value); // no need to continue return; } elseif ($value > 0 && $value < 1 && $value[0] === '0') { $value = substr($value, 1); } } $output->add($value); // pass to unit $this->unit->generateCSS($env, $output); }