microsoft / vscode-css-languageservice

CSS, LESS & SCSS language service extracted from VSCode to be reused, e.g in the Monaco editor.
MIT License
317 stars 176 forks source link

support media queries level 4 range for SCSS #312

Closed yukulele closed 1 year ago

yukulele commented 1 year ago

Same as #213 but for SCSS

main {
  background: blue;
  @media (width <= 1024) {
    background: green;
  }
}

error:

) expected scss(css-rparentexpected)
GauravB159 commented 1 year ago

The CSS Scanner picks up < and = as two separate tokens whereas the SCSS Scanner picks up <= as a single token, which might be causing this issue. I tried adding a separate condition for the SCSS Scanner and the error goes away, but the number after does not get highlighted anymore. I'll link a draft pull request just in case I don't figure it out and someone can pick up from there.