Vscode: [css] cssParser incomplete for at-rules

Created on 16 Dec 2015  路  4Comments  路  Source: microsoft/vscode

Few of issues I鈥檝e seen in the parser for at-rules:

  • @supports flagged as unknown at-rule. https://drafts.csswg.org/css-conditional-3/#at-supports . This is supported by all browsers now.
  • @-ms-keyframes isn't flagged. This never existed. It is added here . There is a note below saying it doesn't exist but this code doesn't seem to do anything. Removing L480 above fixes it, but I don't know if there should be a more specific error message to show that the prefix was never needed and thus is redundant?
  • For @viewport the method is named _parseMSViewPort instead of _parseViewPort, and only includes the -ms- version. Opera Presto (so Opera Mini still) supports @-o-viewport and it is a good idea to allow the unprefixed version for forwards compatibility. It is supported behind a flag in Chrome/Opera 15+.
  • Same issue as above for @document, except the method name is named more generically.
  • @counter-style missing. Supported by Firefox (33+). This could hit the two browser rule, but @document is included.
  • Same as above for @font-feature-values. Firefox 34+.

of the new ones, @supports is probably the most critical to fix as it is widely supported now and we'd like to promote it as a better alternative to UA detection for CSS.

Most of these including all @keyframes also don't syntax highlight properly (beyond general broken CSS highlighting in the insider release), but I can look to fix that in CSS.plist separate from this.

bug css-less-scss

Most helpful comment

I get a lot of errors for "@apply" with polymer

All 4 comments

For @document, it has been postponed to Conditional Rules L4, which doesn't exist yet, so that one can probably stay as it is.

I get a lot of errors for "@apply" with polymer

meet this

@supports will be supported for 1.17 (September)
I went through the rest of the suggestions and they got fixed no action is needed

Was this page helpful?
0 / 5 - 0 ratings