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

New option: rule-delimiter #210

Closed
tonyganch opened this issue Mar 31, 2014 · 86 comments
Closed

New option: rule-delimiter #210

tonyganch opened this issue Mar 31, 2014 · 86 comments

Comments

@tonyganch
Copy link
Member

tonyganch commented Mar 31, 2014

Moved from #209:

I guess we should add an option like rule-delimiter which will set spaces between rulesets and media queries (this has been already discussed in #92).
It seems to me that this option should be more important than space-after-declaration (see #197).
So we can have, for example: { 'space-after-declaration': 1, 'rule-delimiter': '\n\n' }

// Before
a {
    color: tomato;
    top: 0;
    panda {
        position: happy;
    }
    raccoon {
        a: b;
    }
    foo: bar;
}
div {
    border: none;
}

// After
a {
    color: tomato; top: 0;

    panda {
        position: happy;
    }

    raccoon {
        a: b;
    }

    foo: bar;
}

div {
    border: none;
}

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/1519010-new-option-rule-delimiter?utm_campaign=plugin&utm_content=tracker%2F214563&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F214563&utm_medium=issues&utm_source=github).
@tonyganch
Copy link
Member Author

Alas, there is no way to achieve this with current settings.
We need to introduce new options to make this work.

@evenicoulddoit
Copy link

Big +1 from me. I just spent quite a while manually adding new lines in!

@lefoy
Copy link

lefoy commented Jun 9, 2014

Is this implemented with the new V3? I can't find the option in the docs.
#214

@tonyganch
Copy link
Member Author

Is this implemented with the new V3?

@lefoy, nope

@lefoy
Copy link

lefoy commented Jun 9, 2014

Any idea when this will be implemented? Is it planned for the stable V3 release?

@mbrammer
Copy link

+1 from my side

@dankempster
Copy link

+1 would love this

@hanakin
Copy link

hanakin commented Jun 27, 2014

+1

@marijnvdwerf
Copy link

+1 from me too

@jonathan-fielding
Copy link

Hello, do we have an ETA for this? would be awesome

@tonyganch
Copy link
Member Author

There is no ETA for this option.
But you can help by sending a PR.

@somerandomdude
Copy link

Huge +1.

@znamenskii-ilia
Copy link

+1

@nitrium
Copy link

nitrium commented Jul 24, 2014

+1, would love to have this

@thebugs
Copy link

thebugs commented Jul 25, 2014

@denisborovikov
Copy link

@thebugs I think it should accepts number of lines as parameter, not boolean.

@lefoy
Copy link

lefoy commented Jul 25, 2014

+1 for number of lines instead of boolean

@thebugs
Copy link

thebugs commented Jul 25, 2014

I've updated gist. Now it accepts number of lines as parameter

@denisborovikov
Copy link

@thebugs Thank you! Good job!

@FernE97
Copy link

FernE97 commented Jul 29, 2014

@thebugs Thanks! Looks like there is a small issue though if you run csscomb more than once it keeps adding an extra line below the rule, so if you run it 3 times there are three blank lines under each rule.

@thebugs
Copy link

thebugs commented Jul 30, 2014

@FernE97 I use only scss. So if there are issues with other syntax - sorry.

@FernE97
Copy link

FernE97 commented Jul 31, 2014

@thebugs I am using scss as well and that is where I'm noticing the issue. Wonder if there is something in my .csscomb.json config file that is conflicting with it.

Here is my config file minus the huge sort-order array.

{
    "remove-empty-rulesets": true,
    "always-semicolon": true,
    "color-case": "lower",
    "block-indent": "    ",
    "color-shorthand": true,
    "element-case": "lower",
    "eof-newline": true,
    "leading-zero": true,
    "quotes": "single",
    "sort-order-fallback": "abc",
    "space-before-colon": "",
    "space-after-colon": " ",
    "space-before-combinator": " ",
    "space-after-combinator": " ",
    "space-between-declarations": "\n",
    "space-before-opening-brace": " ",
    "space-after-opening-brace": "\n",
    "space-after-selector-delimiter": "\n",
    "space-before-selector-delimiter": "",
    "space-before-closing-brace": "\n",
    "strip-spaces": true,
    "tab-size": true,
    "unitless-zero": true,
    "vendor-prefix-align": true,
    "rules-delimiter": 1
}

@NikolaMalich
Copy link

+1 would really love to see this

@SpencerCarstens
Copy link

What is the current status on this?

How can I help make this a thing?

@lstanard
Copy link

+1

@tonyganch
Copy link
Member Author

@SpencerCarstens, the most recent pr is #405

@banrikun
Copy link

banrikun commented Aug 5, 2015

+1

1 similar comment
@nvartolomei
Copy link

+1

@evgenTraytyak
Copy link

+1

1 similar comment
@debbiechiang
Copy link

+1

@zellwk
Copy link

zellwk commented Aug 24, 2015

+1

10 similar comments
@mwyatt
Copy link

mwyatt commented Aug 24, 2015

+1

@testerix1
Copy link

+1

@oranj
Copy link

oranj commented Aug 31, 2015

+1

@brunnolou
Copy link

+1

@galengidman
Copy link

+1

@siriniok
Copy link

+1

@alexkwa
Copy link

alexkwa commented Sep 17, 2015

+1

@ghost
Copy link

ghost commented Sep 18, 2015

+1

@zhe
Copy link

zhe commented Sep 22, 2015

+1

@rastersysteme
Copy link

+1

@csscomb csscomb locked and limited conversation to collaborators Sep 29, 2015
@tonyganch
Copy link
Member Author

I'm temporarily locking the conversation to avoid more +1's.
If anyone feels like helping, please refer to the open pr: #405
Thank you.

@tonyganch tonyganch removed this from the Next release milestone Jul 11, 2016
@jdalton jdalton closed this as completed Apr 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests