js-beautify
js-beautify copied to clipboard
Add option to add space between CSS selectors
Description
This is the default template for feature requests. I don't see any option to set space between the CSS selectors like: No space: a,p,b{} Yes space: a, p, b{} So, it'll be awesome if you add this feature too.
NOTE:
- Do not include screenshots! This library is a text processor, we need text inputs and outputs for debugging and fixing issues.
- Check the list of open issues before filing a new issue.
Input
With this new feature, when I give like this input:
#main,#section, a {
color: blue;
}
Expected Output
I'd like to see this output:
/*When the option is true*/
#main, #section, a {
color: blue;
}
/*When the option is false*/
#main,#section,a {
color: blue;
}
Environment
OS: Android => Chrome
@BibekOli
Have you tried space_around_combinator
?
Please reopen if that does not work.
No, space_around_combinator
doesn't work in putting/ removing spaces after ',' comma.
It only work with 3 combinator i.e. + > ~
Here, I gave this code to beautify: p,b,a>b{color:red}
When space around combinator is "false" p, b, a>b { color: red; }
When space around combinator is 'true' p, b, a > b { color: red; } It doesn't control the space after comma.
Hi, it doesn't look like this is in development yet so I've begun working on this assuming it is still an enhancement of interest. I'll keep everyone updated on my progress. Thanks.
Hi, I just opened a PR #2029 for my first attempt at implementing this option. Let me know what you think.