postcss/postcss-nested

Nested "&" at the tail not resolved correctly

rluba opened this issue · 3 comments

rluba commented

The following code:

.a { .b { .c & {} } }

… gets transformed into:

.a .c .b {}

… but it should be:

.c .a .b {}

…because the & references the whole current selector, not just the immediate parent. (Sass generates the correct output.)

ai commented

Agree. Please send PR.

rluba commented

👍 Already working on it…

ai commented

Feel free to ask questions about the current architecture