CSS Next

I'm using IntelliJ IDEA 2016.3.2 in a project that uses `postcss-cssnext` features. When editing a CSS file IDEA flags a lot of errors that aren't actual errors, apparently because it does not understand CSS Next things like nesting:

.parent {

    & .child {

    }

}

This makes editing CSS in IDEA very difficult. By contrast, .scss files work fine. Is there a way to make .css files work better?

3 comments
Comment actions Permalink

Idea 2016.2 doesn't support PostCSS. You can try Idea 2016.3 EAP https://confluence.jetbrains.com/display/IDEADEV/IDEA+2016.3+EAP) with PostCSS plugin that can be installed in Preferences | Plugins, see blog post for details

0
Comment actions Permalink

But it actually isn't just a postcss plugin, it's a part of the next (css4 or others) standard. 

0
Comment actions Permalink

@Spaxi4

Yeah I found that confusing, it should be native CSS (eventually) syntax support, PostCSS is just a tool to let us use the syntax today and seems mostly irrelevant to the IDE. But I guess re-using PostCSS toolset was a way to get integration into IDE. Whatever the case I've since been using the PostCSS Support in IDEA and it works great!

0

Please sign in to leave a comment.