jetbrains-csscomb icon indicating copy to clipboard operation
jetbrains-csscomb copied to clipboard

Php storm comb not working

Open maliyshock opened this issue 8 years ago • 24 comments

I run through all steps in docs, but steel nothing. Am i do somthing wrong?

http://joxi.ru/GrqzoBqIQY06jm http://joxi.ru/12MBMxksMKWLJA http://joxi.ru/MAjGKeks4LBaQr

maliyshock avatar Feb 17 '17 22:02 maliyshock

Had the same problem, although it was working if I ran the same command in the terminal.

Solved by installing version 3.1.5 (tried a bunch of versions):

npm install -g [email protected]

vbelius avatar Mar 28 '17 15:03 vbelius

@vbelius Thanks for the correct version. Don't know what happened with csscomb recently, was working then I updated and it was not finishing the process anymore.

simofacc avatar Apr 06 '17 18:04 simofacc

I added a pull request to update the readme so the latest version of CSScomb works as an external tool for JetBrains editors (such as WebStorm, PhpStorm, and IntelliJ IDEA).

Here's the pull request: https://github.com/csscomb/jetbrains-csscomb/pull/7

Summary, thank you @Euheny :

  • It adds instructions to use the -t option in the parameters field.

gabriensymons avatar May 02 '17 17:05 gabriensymons

i found it! -t, --tty-mode execution in TTY mode (useful, when running tool using external app, e.g. IDE)

euheny avatar May 17 '17 12:05 euheny

guys, may be i will disappoint you. Css comb is useless, because he always put pseudo-elements and pseudo-classes to the bottom - it is rly not good, because it is rly important where i put that stuff

maliyshock avatar May 18 '17 10:05 maliyshock

sorting define in config, and no - not sort :) pseudo-elements and pseudo-classes remain in place

euheny avatar May 18 '17 18:05 euheny

Hmmm... can you share that for example? As i remember i tried that and it wont help.

maliyshock avatar May 18 '17 18:05 maliyshock

@gabriensymons with -t any version is working @maliyshock try on online http://csscomb.com/online in my case very helpful for code style guide :)

euheny avatar May 19 '17 16:05 euheny

Thanks @Euheny! I updated my pull request with your discovery: #7

gabriensymons avatar May 19 '17 16:05 gabriensymons

@Euheny he cant work with preprocessor syntax here http://csscomb.com/online

Im talking about that constructions. For example u use sass file with this code

.comb-me {
    &:after{
      display:inline block;
      content:'';
    }

    position:relative;
}

So if u comb it, u get somthing like this

.comb-me {
    position:relative;

    &:after{
      display:inline block;
      content:'';
    }
}

maliyshock avatar May 19 '17 20:05 maliyshock

@maliyshock Hm. Did not think about this case. In our code-style all 'block' go after main rules.

includes extends styles pseudo nesting content mixins media mixins

@gabriensymons you're welcome

in my case:

euheny avatar May 19 '17 21:05 euheny

@Euheny thx, $FilePath$ -v - it's works for me

forrest-lee avatar Jul 12 '17 13:07 forrest-lee

@Euheny - second that thx - $FilePath$ -v -t was the thing that worked for me as well - nothing else was working.

prosim avatar Oct 04 '17 07:10 prosim

Tested on PyCharm 2017.2, CSScomb 4.2.0. -t $FilePath$ doesn't work, but $FilePath$ -t works. I hope someone could update the document for this little problem.

YiqinZhao avatar Dec 01 '17 09:12 YiqinZhao

stop working in phpstorm 2017.3.3 https://image.prntscr.com/image/dbwJm2XXTTez1qIGEN0aGA.png there are no errors, but sorting is not performed.

Alecto avatar Jan 28 '18 22:01 Alecto

@Alecto Confirmed and reproduced on WebStorm 2017.3.3, csscomb 4.2.0

But I don't think it is an error related to IDE itself. I have a global configuration file at ~/.csscomb.json, after removing this file, csscomb works again.

Are you using the configuration files in official repo? It seems that the official configs caused this problem.

Try remove that, then generate new configuration files online.

YiqinZhao avatar Jan 29 '18 00:01 YiqinZhao

@HawkinsZhao, thank U. I did what you advised. generated a new file .csscomb.json https://image.prntscr.com/image/N-TWxqXwRZaOkt-_5bSx4Q.png also I tried to delete .csscomb.json the result remained unchanged, the properties are not sorted, the scss file where I run csscomb - does not change at all.

Alecto avatar Jan 29 '18 20:01 Alecto

@Alecto Hi, I can't reproduce, can you give me a sample of your scss file?

Aslo, try using csscomb in command line, check if csscomb work properly.Maybe there should be some OS related problems troubling you? I'm using macOS 10.13.3, I'm not familiar with Windows.

YiqinZhao avatar Jan 30 '18 02:01 YiqinZhao

scss files?

https://drive.google.com/file/d/1sVhmBfkmEC_kPdmjw3W2K8TmzoXN9yOq/view?usp=sharing Now they are sorted using npm-csscomb + gulp (plz change position of css properties and try any _*.scss), I do not think they have a problem.

Alecto avatar Jan 30 '18 07:01 Alecto

@Alecto That's curious. csscomb works fine with these scss files on my machine.🤔

YiqinZhao avatar Jan 30 '18 08:01 YiqinZhao

could you show me, please, your settings of the csscomb in phpstrom (screen) and send me your .csscomb.json as is, please? and maybe version? i use global +-- [email protected]

Alecto avatar Jan 30 '18 08:01 Alecto

Here it is:

{
    "remove-empty-rulesets": true,
    "always-semicolon": true,
    "color-case": "upper",
    "block-indent": "    ",
    "color-shorthand": false,
    "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": " ",
    "space-before-selector-delimiter": "",
    "space-before-closing-brace": "\n",
    "strip-spaces": true,
    "tab-size": true,
    "unitless-zero": true
}

YiqinZhao avatar Jan 30 '18 08:01 YiqinZhao

the same, but i have to use .....csscomb.cmd if ....csscomb - i have error.

in any case - nothing happened ((

I think there are problems in the version of phpstorm. now installed 2017.3.3. when it was 2017.2.4 - everything worked.

Alecto avatar Jan 30 '18 08:01 Alecto

OK... That's so sad.

YiqinZhao avatar Jan 31 '18 00:01 YiqinZhao