5

I am using PyCharm as my IDE for about 1 year, and in my PyCharm setting --> Editor --> Appearance, "Show CSS color preview icon in gutter" is checked.

But the preview icon only shows in a <style> block in .html. And when I moved the styles into a separate .css file, the preview icon just not show.

How can I make the color preview icon show in a .css file in PyCharm ?

bad_coder
  • 11,289
  • 20
  • 44
  • 72
Desmond Chen
  • 492
  • 5
  • 17

3 Answers3

7

Can't reproduce:

CSS

Check that .css is mapped to the correct file type in Settings | File Types.

Also try File | Invalidate Caches | Invalidate and Restart.

If the above doesn't help, contact support with a sample project to reproduce, your settings exported with File | Export Settings and idea.log.

UPDATE: colors in the gutter may not show if you have Highlighting Level set lower than Inspections:

level

CrazyCoder
  • 389,263
  • 172
  • 990
  • 904
  • 2
    this was very helpful, tnx. Also note that this will not work if your power save mode in on! – Erika Sep 05 '13 at 10:34
  • Curiosity got the best of me here - I had turned on power saving mode and didn't notice my gutter color pickers missing until I forgot I had turned it off. I hate you Power Save Mode - Go Away!!! ;-) – Thom Porter Nov 01 '13 at 06:17
3

I had the same issue (with PhpStorm) and the solution was to choose any other scheme than Dracula.

Update: Alternatively, I had to decrease the editor font size in order to display the colors. See this bug.

Attila Fulop
  • 6,861
  • 2
  • 44
  • 50
1

Colors in the gutter also may not show if Editor => General => Change font size (Zoom) with Ctrl + Mouse Wheel is on. Just turn it off or zoom out/in. If still nothing happened reopen the file.

Dias
  • 101
  • 1
  • 4