tree-sitter / tree-sitter-css

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

Highlighting issues with grid-template #24

Closed astridlyre closed 1 year ago

astridlyre commented 2 years ago

I've noticed some weird highlighting issues with the grid-template shorthand:

.grid {
  display: grid;
  grid-template:
    [header-left] "header header header" 8rem [header-right]
    [main-left]   "nav article aside"    1fr  [main-right]
    [footer-left] "footer footer footer" 8rem [footer-right]
    / 20% 60% 20%;
  min-height: 100vh;
  max-width: 100vw;
}

The grid-template shorthand makes highlighting go funky through to the rest of the block. I think perhaps it's the line names that are causing it? I don't think it likes the square brackets.

astridlyre commented 2 years ago

Area-2021-12-23-1640311104_563x348

Here is a picture, for reference, to show the weird highlighting.