Vetur: how to support cssnext syntax

Created on 21 Feb 2017  路  10Comments  路  Source: vuejs/vetur

I want syntax hightlight without no lang set. I just use cssnext for nest selectors.

lang="less"
image

hightlight ok.

no lang set

image

error hightlight

feature-request

Most helpful comment

OK. This looks more promising though: https://github.com/y0ssar1an/CSS3

I'll look into it and have it by next version.

All 10 comments

or i just want less syntax hightlight default

When not specifying lang, <style> defaults to css, according to Vue SFC spec.

image

vetur only builds support according to Vue SFC. Sorry.

Oops, I ignored cssnext part. If there is a good postcss/cssnext grammar out there, I can support it. But I wouldn't want to write postcss support from scratch.

https://github.com/postcss/postcss/issues/409#issuecomment-156291882
There are sublime and atom postcss syntax hightlight

OK. This looks more promising though: https://github.com/y0ssar1an/CSS3

I'll look into it and have it by next version.

CSS3 uses Sublime Text specific grammar, so I guess the best I can do is to port the Atom PostCSS extension, or include the grammar from https://github.com/azat-io/atom-language-postcss

image

Will be available in next release.

It seems that vetur doesn't support the feature 'nesting' of cssnext

I also found vetur doesn't support nesting syntax.

For PostCSS, you only have syntax highlight.
Vetur was using CSS error checking for PostCSS, and I just disabled that.

Was this page helpful?
0 / 5 - 0 ratings