Closed mccoyrjm closed 5 years ago
Writing a basic parent-child selector like this
.class1 { .class2 { property: value; } }
results in an incorrect format on the compiled CSS in lines 2 & 3. Those lines are using the spacing from lines 2 & 4 from the Pre-Compiled code.
.class1 .class2 { property: value; /* 4 spaces before */ } /* 2 spaces before */
Per the documentation, I'd expect line 2 to have 2 spaces before and line 3 to have none.
Here is a link to a codepen using the postcss-nested plugin demonstrating this behavior.
Steps to Replicate
postcss-nested
Sorry, it is too many edge cases to trying to keep origin code style.
Just use any PostCSS plugin to force the style which you want. You can use Stylelint or stylefmt.
Writing a basic parent-child selector like this
results in an incorrect format on the compiled CSS in lines 2 & 3. Those lines are using the spacing from lines 2 & 4 from the Pre-Compiled code.
Per the documentation, I'd expect line 2 to have 2 spaces before and line 3 to have none.
Here is a link to a codepen using the postcss-nested plugin demonstrating this behavior.
Steps to Replicate
postcss-nested
plugin.