postcss / postcss-nested

PostCSS plugin to unwrap nested rules like how Sass does it.
MIT License
1.15k stars 66 forks source link

Nested "&" at the tail not resolved correctly #115

Closed rluba closed 3 years ago

rluba commented 3 years ago

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 3 years ago

Agree. Please send PR.

rluba commented 3 years ago

👍 Already working on it…

ai commented 3 years ago

Feel free to ask questions about the current architecture