csscomb / sublime-csscomb

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

space-after-declaration with Less functions #25

Open pierrefaure opened 10 years ago

pierrefaure commented 10 years ago

Hello!

I just discovered CSScomb and I love it! :smiley:

I have implemented it in one of my projects working with Less and I have seen that my Less functions aren't correctly indented in Sublime Text 3. Example :

.class{
    background-color:#FFF;
    border:none;.border-radius(0);
    color:#000;
}

I thought space-after-declaration would be working but it's not the case. Is there a way to solve that? (I don't care if functions are at the beginning / the end or sorted by the first letter)

Here is my current configuration :

{
    "color-case": "upper",
    "block-indent": "\t",
    "color-shorthand": true,
    "element-case": "lower",
    "leading-zero": false,
    "quotes": "double",
    "sort-order": [],
    "sort-order-fallback": "abc",
    "space-before-colon": "",
    "space-after-colon": "",
    "space-before-combinator": " ",
    "space-after-combinator": " ",
    "space-between-declarations": "\n",
    "space-after-declaration": "\n",
    "space-before-opening-brace": "",
    "space-after-opening-brace": "\n",
    "space-after-selector-delimiter": " ",
    "space-before-selector-delimiter": "",
    "space-before-closing-brace": "\n",
    "unitless-zero": true,
    "vendor-prefix-align": true
}

Thank you!

pierrefaure commented 10 years ago

This is fixed now (probably in one of the new updates)

Thanks :+1:

css-comb-less-mixins

tatygrassini commented 10 years ago

Do you mind sharing how and why is this fixed now? I still have the same indentation problem, plus the extra empty line at the end.

pierrefaure commented 10 years ago

Hi, I may have speak too fast, this is only partially fixed:

"1." is working, "2." is not, see example below

  1. If I have something like this: capture d ecran 2014-08-21 a 11 18 23 then I launch CSScomb, it looks like this: capture d ecran 2014-08-21 a 11 19 21
  2. But, if I have something like this: capture d ecran 2014-08-21 a 11 19 52 then I launch CSScomb, it looks like this: capture d ecran 2014-08-21 a 11 20 19

So, the problem is that if you write your css in line, this will not work correctly.