Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML Syntax Highlighting Bug #120915

Closed
emilgoldsmith opened this issue Apr 9, 2021 · 2 comments
Closed

HTML Syntax Highlighting Bug #120915

emilgoldsmith opened this issue Apr 9, 2021 · 2 comments
Assignees
Labels
grammar Syntax highlighting grammar upstream Issue identified as 'upstream' component related (exists outside of VS Code)

Comments

@emilgoldsmith
Copy link

emilgoldsmith commented Apr 9, 2021

  • VS Code Version:
Version: 1.55.0
Commit: c185983a683d14c396952dd432459097bc7f757f
Date: 2021-03-30T16:02:21.560Z
Electron: 11.3.0
Chrome: 87.0.4280.141
Node.js: 12.18.3
V8: 8.7.220.31-electron.0
OS: Linux x64 5.8.0-48-generic
  • OS Version: Ubuntu 20.04.2 LTS

Steps to Reproduce:

  1. Create a file with these contents in VSCode:
<!DOCTYPE HTML>
<html>
  <head>
    <style>
      @-ms-viewport {
        width: device-width;
      }
    </style>
  </head>
</html>
  1. Notice that everything from (and including) </style> is miscoloured and somehow the end of the style tag is not registered

Does this issue occur when all extensions are disabled?: Yes

@alexr00
Copy link
Member

alexr00 commented Apr 12, 2021

We recently moved to a different CSS grammar for providing syntax highlighting. The old one was unmaintained, and the new one has good fixes in it. You can see the full discussion here: #115480

Specifically, see #115480 (comment), which references viewport as a deprecated feature (details https://developer.mozilla.org/en-US/docs/Web/CSS/@viewport). Even though the new grammar is missing ms-viewport, we decided to go with it because the benefits of having a maintained grammar outweighed the negative of missing the deprecated ms-viewport.

If you feel strongly that this is essential for the grammar, I recommend going to https://github.com/atom/language-css/, the repo that we pull our css grammar from, and filing an issue there to ask for ms-viewport to be supported in their textmate grammar.

@alexr00 alexr00 added grammar Syntax highlighting grammar upstream Issue identified as 'upstream' component related (exists outside of VS Code) labels Apr 12, 2021
@alexr00 alexr00 closed this as completed Apr 12, 2021
@emilgoldsmith
Copy link
Author

Thank you for the response Alex, and taking the time to explain the reasoning behind it to me!

It's definitely not the biggest deal for me, but I'll submit an issue upstream either way, and see what happens.

Be well!

@github-actions github-actions bot locked and limited conversation to collaborators May 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
grammar Syntax highlighting grammar upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests

3 participants