postcss / postcss-nested

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

Nested custom at-rules issues #136

Closed bsak-shell closed 3 years ago

bsak-shell commented 3 years ago

There are several issues related to the custom at-rule nesting (#81, #124, #123). This issue is to fix the below general behaviour:


Example 1 (bubbling up custom childless at-rules):

@media screen { .two { @mixin test } }

Expected output:

@media screen { .two { @mixin test } }

Actual output:

@media screen { @mixin test; }


Example 2 (bubbling up all at-rules, ignoring the option setting):

@media screen { .three { @mixin test { color: black } } }

Expected output:

@media screen { .three { @mixin test { color: black } } }

Actual output:

@media screen { @mixin test { .three { color: black } } }
ai commented 3 years ago

Thanks. Released in 5.0.6.