microsoft / microsoft/vscode-css

css syntax coloring doesn't work properly with css custom media

Open
#45 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
27
Forks
25
Avg merge
3d 19h
Merged PRs (30d)
2

Description

CSS files using custom media queries (e.g. @media (--desktop-down) {..}) have incorrect syntax highlighting (see attached image)

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

It occurs in vscode insiders too

  • VS Code Version: 1.103.0
  • OS Version: OSX 15

Steps to Reproduce:

  1. Create a css file using custom media syntax
Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue in a CSS file using a custom media query such as @media (--desktop-down) {} with extensions disabled. Inspect the CSS TextMate grammar used by vscode-css and compare the highlighting with standard media queries. Done means custom media syntax receives correct syntax coloring in the reproduced case.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.