leafo / scssphp

SCSS compiler written in PHP
MIT License
1.34k stars 214 forks source link

Index issue with multi level lists #717

Closed stempora closed 4 years ago

stempora commented 4 years ago

When using multi levels lists an index for an element will return null.

Here is the scss:

` $test : ( "x" , "y" , "z") ; $test2 : "z";

@debug($test); @debug(index($test , $test2));

$xtest : ( (class : "x") , (class : "y") , (class : "z") ) ; $xtest2 : (class : "z");

@debug($xtest); @debug(index($xtest , $xtest2)); `

When using the node compiler i receive this:

scss2\test.scss:6 Debug: "x", "y", "z" scss2\test.scss:7 Debug: 3 scss2\test.scss:17 Debug: (class: "x"), (class: "y"), (class: "z") scss2\test.scss:18 Debug: 3

When using the php compiler, the second index returns null ...

File test.scss on line 6 DEBUG: "x", "y", "z" File test.scss on line 7 DEBUG: 3 File test.scss on line 17 DEBUG: (class: "x"), (class: "y"), (class: "z") File test.scss on line 18 DEBUG: null

Any fix for that ?

Thanks!

robocoder commented 4 years ago

Try scssphp/scssphp. The latest version is 1.1.0.