-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nested lists get flattened in javascript evaluation #1939
Comments
This issue is somewhat expected since Btw., speaking of multidimensional arrays, don't miss that |
Hmmm, then implementing the behavior I was expecting would most likely be a breaking change. Wonder if this is used anywhere in the real world... Looks like |
It was almost too easy getting nested lists passed into javascript :) (see https://github.com/rasmusfl0e/less.js/commit/39b366ef790ffa0e899aca6ea26ee4e7db008501) |
I just came to report this :). Here is my test case:
Current output is:
I expected this:
|
@csshat Btw, LessHat relies on current behavior. At minimum their |
Yeah - context is important. Both Less and JS are capable of handling lists/arrays of arbitrary nesting depths - logically.
It's rather trivial to translate both value/expression lists into arrays for javascript consumption (see 39b366e). |
Not quite, we still can loop though every item and output through P.S.
Nope as well, consider this example:
I.e. technically any "type" (i.e. |
Which of course does not cancel the fact that in context of CSS a space separated list containing a comma separated list does not make any sense (i.e. only |
Using the rest variable (
...
) I ran into this weird behavior: lists in the rest variable get flattened when passing into a javascript function like in the example below!Is this behavior intentional? I was not expecting nested lists to get flattened like that.
The text was updated successfully, but these errors were encountered: