Postcss: syntax highlightning

Created on 6 Jul 2015  ·  14Comments  ·  Source: postcss/postcss

everybody have colorful sass or less

and then its broken for postcss

Most helpful comment

All 14 comments

Just set SCSS format to highligh postcss-nested. Without postcss-nested CSS highlight just works.

We will talk with text editor authors when we have better understanding what PostCSS support we need from them.

What do you mean ? What is broken ?
It depends on the editor you use and the grammar definition. For example using Atom, I don't have any major issue for highlighting.

Yeah it's a better idea to push example to grammar plugin to fix some use case. But well they will support only "valid css syntax" probably so...

it’s not that critical issue for postcss-development and improvement but it will be negative buzz around postcss about broken syntax highlighting. So we should develop it with highlighting in mind

guys, you are too fast. 4 comments and two closed issues in only 5 minutes =)

The problem is the boundaries between what is css and what is not. postcss-nested syntax is not valid css... I have to admit it's "a bit complicated" to handle here (postcss org) should better push some issues to relevant place with some code snippet they should accept as css.

im not 100% sure how highlighting is working in editor, so I wiil ask prob stupid question. Is there any way to say to editor which grammar is valid and which is not? for example postcss-nested will say nested selectors are valid, postcss-simple-vars will say that $smth is also valid and so on

Most editor use a grammar definition, so you might want to make your own. Example https://github.com/atom/language-css/blob/master/grammars/css.cson

@yisibl nice start. would be great if it used the css3 package, as it's got a great set of completions.

Any updates about highlighting?earlier was ideas about .pss file extention. Any updates about that?

Atom and Sublime already have good plugins. JetBrains still ignore (don't use IDE if you want to work with modern stuff).

Latest Jetbrain Editors have support for variables at least, as Visual Studio Code too. I understand why, for example, custom-media queries aren't supported yet: Because they are not fixed in the specification. (as you know lately it was decided that custom-media queries aren't in the Selector Level 4 Spec, postponed to next draft).

Was this page helpful?
0 / 5 - 0 ratings