csscomb / sublime-csscomb

Sublime plugin for CSScomb—CSS coding style formatter
398 stars 61 forks source link

Options to completely ignore some settings? #34

Closed rareyman closed 10 years ago

rareyman commented 10 years ago

Is there a way to configure sublime-csscomb to apply only certain options and ignore others entirely?

For example, I would love to set up a config that only applies the sort order option, but completely ignores all the other features (no formatting, spacing before/after brackets, etc.). Something like:

"space-before-closing-brace": ignore

galengidman commented 10 years ago

+1. I used to love this tool, but it's become very intrusive lately. I just want sort order. Is that possible?

rareyman commented 10 years ago

Agreed. I've been trying to figure out how to get CSSComb to work like it used to. :(

tonyganch commented 10 years ago

Hello, guys! If you'd like to use only sort order, just make a custom config: open CSScomb preferences and leave there only sort-order removing other options. Here is a link on custom configs: https://github.com/csscomb/sublime-csscomb#custom-configuration

galengidman commented 10 years ago

I've tried this and while it leaves some things alone, it deletes new lines after closing brackets as well as a few other changes.

Example, using the pre-defined Zen config as set in Preferences → Package Settings → CSScomb → Settings Users in the Sublime Text plugin:

Before

.gfc-icon {
  position: relative;
  display: inline-block;
  vertical-align: top;
}
.gfc-icon-location {
  width: 22px;
  height: 31px;
  background: url(../img/icon-location.svg);
}
.gfc-icon-phone {
  width: 31px;
  height: 31px;
  background: url(../img/icon-phone.svg);
}
.gfc-icon-social {
  width: 30px;
  height: 30px;
  text-indent: -999em;
}
.gfc-icon-facebook {
  background: url(../img/icon-facebook.svg);
}
.gfc-icon-twitter {
  background: url(../img/icon-twitter.svg);
}
.gfc-icon-instagram {
  background: url(../img/icon-instagram.svg);
}
.gfc-icon-rss {
  background: url(../img/icon-rss.svg);
}

After

.gfc-icon
{
    position: relative;
    display: inline-block;
    vertical-align: top;
}
.gfc-icon-location
{
    width: 22px;
    height: 31px;
    background: url(../img/icon-location.svg);
}
.gfc-icon-phone
{
    width: 31px;
    height: 31px;
    background: url(../img/icon-phone.svg);
}
.gfc-icon-social
{
    width: 30px;
    height: 30px;
    text-indent: -999em;
}
.gfc-icon-facebook
{
    background: url(../img/icon-facebook.svg);
}
.gfc-icon-twitter
{
    background: url(../img/icon-twitter.svg);
}
.gfc-icon-instagram
{
    background: url(../img/icon-instagram.svg);
}
.gfc-icon-rss
{
    background: url(../img/icon-rss.svg);
}
rareyman commented 10 years ago

I can confirm this as well. Setting up the config does not work as expected.

Maybe tonyganch can post a config that ignores all settings except for sort-order for us to confirm?