When beautifying a CSS rule containing a >
combinator, the combinator got stuck to the previous selector. Actually, even if it already formatted correctly, the space is removed. It makes quite difficult to use js-beautify
in CSS files containing > combinators because it will produce selectors that won't work.
The code looked like this before beautification:
.foo > h3 {
...
}
I would expect the input to not change. The code should have looked like this after beautification:
/* Space here
V */
.foo > h3 {
...
}
The code actually looked like this after beautification:
/* No space
V */
.foo> h3 {
...
}
OS: Archlinux with Emacs web-beautify.el
Also tested under command line only outside of Emacs.
Defaults
It has been fixed in 1.6.4
, it don't happen anymore since I set space_around_combinator
to true, my bad. This param should be true by default though.
Hello! I still have a "no space" around any sibiling selector when I beautify a css file.
I actually use atom-beautify.
Me too
@NSExceptional @subfighter3
https://beautifier.io/ with setting:
{
"space_around_combinator": true
}
Formats as expected. Fix will be needed in atom beautifier.
Thanks!
Thank you!
Most helpful comment
Hello! I still have a "no space" around any sibiling selector when I beautify a css file.
I actually use atom-beautify.