atom / language-css

CSS package for Atom

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CSS @media in HTML file breaks syntax highlighting

aeschli opened this issue · comments

From @ggregoire on March 10, 2017 17:4

  • VSCode Version: last one
  • OS Version: macOS

Hi,

@media into <style></style> breaks the syntax highlighting.

screen shot 2017-03-10 at 11 00 17

Copied from original issue: microsoft/vscode#22404

Reproduce with

<html>
<style>
h1 {
  color: red;
  
}@media only screen {
  
}
</style>
</html>

Problem is the lack of a whitespace before @media

Crap, sorry. For some reason, }@atrule never occurred to me when writing these rules. :(

Will submit a PR to fix this in a minute.

FYI, this has absolutely nothing to do with the fact it's embedded inside an HTML document. The same bug is visible in plain CSS, too. @media isn't the only rule that's affected, either.

Addressed in #108.