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

Php storm comb not working #6

Open
maliyshock opened this issue Feb 17, 2017 · 24 comments
Open

Php storm comb not working #6

maliyshock opened this issue Feb 17, 2017 · 24 comments

Comments

@maliyshock
Copy link

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

@vbelius
Copy link

vbelius commented Mar 28, 2017

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]

@simofacc
Copy link

simofacc commented Apr 6, 2017

@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.

@gabriensymons
Copy link
Contributor

gabriensymons commented May 2, 2017

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: #7

Summary, thank you @euheny :

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

@euheny
Copy link

euheny commented May 17, 2017

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

@maliyshock
Copy link
Author

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

@euheny
Copy link

euheny commented May 18, 2017

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

@maliyshock
Copy link
Author

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

@euheny
Copy link

euheny commented May 19, 2017

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

@gabriensymons
Copy link
Contributor

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

@maliyshock
Copy link
Author

maliyshock commented May 19, 2017

@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:'';
    }
}

@euheny
Copy link

euheny commented May 19, 2017

@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:

@forrest-lee
Copy link

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

@prosim
Copy link

prosim commented Oct 4, 2017

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

@YiqinZhao
Copy link
Contributor

YiqinZhao commented Dec 1, 2017

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.

@Alecto
Copy link

Alecto commented Jan 28, 2018

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

@YiqinZhao
Copy link
Contributor

@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.

@Alecto
Copy link

Alecto commented Jan 29, 2018

@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.

@YiqinZhao
Copy link
Contributor

@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.

@Alecto
Copy link

Alecto commented Jan 30, 2018

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.

@YiqinZhao
Copy link
Contributor

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

@Alecto
Copy link

Alecto commented Jan 30, 2018

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]

@YiqinZhao
Copy link
Contributor

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
}


@Alecto
Copy link

Alecto commented Jan 30, 2018

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.

@YiqinZhao
Copy link
Contributor

OK... That's so sad.

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

No branches or pull requests

9 participants