You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the idea: in the same way the old parser looks for parenthesis
delimiters, let's add another case for brackets delimiters.
In case an open bracket is found, the parser will look for a list. There
are three possible results of parsing a list:
First, the parsed expression is not a list at all. libsass parser tends
to avoid wrapping if lists are only one item lists. But bracketed lists
prevent unwrapping so the item becomes the solely item for a new
bracketed list.
Example:
singleton-item --> [ singleton-item ]
Second, the list is indeed a list with some explicit delimiter. This
case is similar to the previous one. Brackets prevent unwrapping so this
time is the list as a whole which become the unique item of the
bracketed list.
Example:
(item1, item2, ...) --> [ (item1, item2, ...) ]
[item1, item2, ...] --> [ [item1, item2, ...] ]
Third, the list is a list with no delimiters. So its items actually
belong to the bracketed list. The parse will fix the delimiter of the
list for them to be brackets.
Example:
Suppose | ... | stands for a list with no delimiters.
|item1, item2, ...| --> [item1, item2, ...]
0 commit comments