Code Styles for CSS are not being applied after updating to 2022 edition

Answered

Code styles for CSS/SCSS are not being applied after updating to IntelliJ IDEA Ultimate 2022.1.3. I'm on a Mac

In the past I've just gone to preferences-->Code Style --> Color Scheme --> CSS. It says I have Darcula set, but everything in my CSS files i just gray. They do have correct file extensions.

Again, these styles were working in my previous version of IntelliJ on this project. I've never had an issue with loosing these styles and created multiple new projects over the years.

Things I've tried:

  • Restarting intellij
  • Changing another small style in this tab, applying, saving - no changes at all here
  • Read through lots of other jetbrains support posts

Thanks in advance!

1
7 comments

Hi Emma,

Could you attach a screenshot of the entire IDE window with your CSS file open in the editor?

1

Hi Arina - sure thing.

0

Thank you.

Configurable code style and syntax highlighting for .pcss files is provided by a separate plugin called PostCSS. Just install it by clicking on the link on the pop-up banner (or do it via File | Settings | Plugins), and restart the IDE if prompted.

1

🤦‍♀️ 

Thank you so much, i can work again without loosing my mind

0

I am trialling version 2022.2.1 just released.  I had the same problem with CSS not being updated.  I installed the PostCSS as above, shutdown and restarted intellijIDEA.  It makes no difference.  It doesn't matter if I run the debugger or the normal server, no changes get picked up.  I tried just changing background colors to test but nothing worked.  It suddenly worked once and then stopped working.  Is there a bug here?  I can't purchase this software if this is the case because it is rather serious if CSS isn't getting picked up.  Please help if I am missing something.  

0

Windsurferlorna please could you elaborate on the issue? is it about the syntax highlighting in the IDE (as in the original post), or about 'live' updating of the CSS code in browser? Steps to repeat plus screenshots illustrating the issue would be helpful

0

You are not going to believe this but it is working today when running the normal server and debugging live.  The only difference between today and yesterday, is that my PC was shut down.  I tried closing intelliJIDEA yesterday and restarting but that didn't work.  But restarting my PC seems to have gotten things to work.  How on earth it worked once yesterday before it stopped working is a mystery.  Perhaps there is a little bug in there somewhere that raises its head after a particular stream of events.  I was doing so much yesterday it is impossible to replicate the exact sequence.  But it might be worth keeping in mind for the future that shutting down my PC fixed the problem.  That shouldn't be necessary but who knows what may have been left in memory somewhere.  How many times in my life hasn't shutdown, pull the plug and restart worked?

1

Please sign in to leave a comment.