diff --git a/src/Compiler.php b/src/Compiler.php index 0efdd37b..30ece138 100644 --- a/src/Compiler.php +++ b/src/Compiler.php @@ -943,9 +943,9 @@ protected function compileChild($child, $out) case 'mixin_content': $content = $this->get(self::$namespaces['special'] . 'content'); - if (!isset($content)) { - $this->throwError('Expected @content inside of mixin'); - } + if (!is_object($content)) { + return; + } $strongTypes = array('include', 'block', 'for', 'while'); @@ -1244,7 +1244,7 @@ protected function normalizeNumber($number) if (isset(self::$unitTable['in'][$unit])) { $conv = self::$unitTable['in'][$unit]; - return array('number', $value / $conv, 'in'); + return array('number', (float) $value / (float) $conv, 'in'); } return $number;