tree-sitter / tree-sitter-css

CSS grammar for Tree-sitter
MIT License
85 stars 34 forks source link

`a:hover` breaks syntax highlighting when nested inside a media query #28

Closed ayushnix closed 1 year ago

ayushnix commented 2 years ago

Here's the piece of the code that exhibits the issue

@media screen {
  a:visited {
    color: var(--fg-link-visited);
  }

  a:hover {
    text-decoration: underline;
    text-underline-offset: var(--space-5xs);
  }

  a:active {
    color: var(--fg-link-visited);
  }
}

code,
pre,
kbd,
samp,
var {
  font-family: var(--mono-font);
}

Here's the video that showcases the issue

https://user-images.githubusercontent.com/79408161/174487928-f70d25c5-85fb-4579-9acc-aa2c4120d59b.mp4