diff --git a/src/Compiler.php b/src/Compiler.php index 7d8db736..28f6ffb6 100644 --- a/src/Compiler.php +++ b/src/Compiler.php @@ -4857,8 +4857,10 @@ protected function getNormalizedNumbers($args) $unit = $number[2]; $originalUnit = $item->unitStr(); } elseif ($unit !== $number[2]) { - $this->throwError('Incompatible units: "%s" and "%s".', $originalUnit, $item->unitStr()); - break; + if ($item->dimension !== '0' || !empty($item->units) || !in_array($originalUnit, ['px', '%'])) { + $this->throwError('Incompatible units: "%s" and "%s".', $originalUnit, $item->unitStr()); + break; + } } $numbers[$key] = $number;