diff --git a/src/Compiler.php b/src/Compiler.php index f02a4b7e..ac7b56fe 100644 --- a/src/Compiler.php +++ b/src/Compiler.php @@ -382,6 +382,11 @@ protected function matchExtendsSingle($rawSingle, &$outOrigin) $single = array(); foreach ($rawSingle as $part) { + // matches Number + if (! is_string($part)) { + return false; + } + if (! preg_match('/^[\[.:#%]/', $part) && count($single)) { $single[count($single) - 1] .= $part; } else { diff --git a/tests/inputs/directives.scss b/tests/inputs/directives.scss index 10e39422..14b89cb7 100644 --- a/tests/inputs/directives.scss +++ b/tests/inputs/directives.scss @@ -108,3 +108,20 @@ div { { body { color: purple; background: yellow; } } + +@keyframes anim-rotate { + 0% { + transform: rotate(0); + } + 100% { + transform: rotate(360deg); + } +} + +.bold { + font-weight: 700; +} + +.icon-ajax { + @extend .bold; +} diff --git a/tests/outputs/directives.css b/tests/outputs/directives.css index 2b715582..4a1ced6e 100644 --- a/tests/outputs/directives.css +++ b/tests/outputs/directives.css @@ -75,3 +75,13 @@ div { body { color: purple; background: yellow; } } + +@keyframes anim-rotate { + 0% { + transform: rotate(0); } + + 100% { + transform: rotate(360deg); } } + +.bold, .icon-ajax { + font-weight: 700; } diff --git a/tests/outputs_numbered/directives.css b/tests/outputs_numbered/directives.css index 7de43a31..9b77350e 100644 --- a/tests/outputs_numbered/directives.css +++ b/tests/outputs_numbered/directives.css @@ -83,3 +83,15 @@ to { body { color: purple; background: yellow; } } + +@keyframes anim-rotate { +/* line 113, inputs/directives.scss */ +0% { + transform: rotate(0); } +/* line 116, inputs/directives.scss */ +100% { + transform: rotate(360deg); } } +/* line 121, inputs/directives.scss */ +.bold, .icon-ajax { + font-weight: 700; } +/* line 125, inputs/directives.scss */