phpsass icon indicating copy to clipboard operation
phpsass copied to clipboard

Cannot use nested lists

Open gabrielfin opened this issue 11 years ago • 1 comments

Defining a nested list (a list of lists) creates a list with all the sublists merged (always, except when the inner list is separated by spaces and the outer one by commas)

For example:

$a: 1, 2, 3;
$b: 4, 5, 6;
$x: $a, $b;
foo {
    bar: nth($x, 1);
    baz: nth($x, 2);
}

should output

foo {
  bar: 1, 2, 3;
  baz: 4, 5, 6;
}

instead, the output is

foo {
  bar: 1;
  baz: 2;
}

The same happens when appending lists, and even when defining the nested list as (1, 2, 3), (4, 5, 6)

I believe the problem is in SassLiteral::op_comma which returns a SassString, but should actually return a SassList. I tried changing it but that triggers other issues and I get stuck.

gabrielfin avatar Jun 12 '14 04:06 gabrielfin

Bump, same issue here.

wpsmith avatar Aug 21 '15 15:08 wpsmith