Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to add space between CSS selectors #1862

Open
bibekoli opened this issue Dec 7, 2020 · 4 comments · May be fixed by #2029
Open

Add option to add space between CSS selectors #1862

bibekoli opened this issue Dec 7, 2020 · 4 comments · May be fixed by #2029

Comments

@bibekoli
Copy link

bibekoli commented Dec 7, 2020

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

@bitwiseman
Copy link
Member

bitwiseman commented Dec 10, 2020

@bibekoli
Have you tried space_around_combinator?
Please reopen if that does not work.

@bibekoli
Copy link
Author

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.

@kcamsanc
Copy link
Contributor

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.

@kcamsanc kcamsanc linked a pull request Apr 10, 2022 that will close this issue
6 tasks
@kcamsanc
Copy link
Contributor

Hi, I just opened a PR #2029 for my first attempt at implementing this option. Let me know what you think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants