Add support for latest syntax in `@import`

Open
#20 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Start at the repository's CSS TextMate grammar entry point and inspect how @import syntax is currently handled. Compare the examples with the CSS Cascade Level 5 specification and related WPT results. Done means declarations, selectors, and functions inside supports() receive syntax highlighting, including both layer forms.

Written by the indexing model from the issue text.

Description

For example :

Screenshot 2023-09-14 at 15 00 28
@import url("green.css") layer supports(selector(&)) (min-width: calc(10px));

/* layer as a function */
@import url("green.css") layer(bar) supports(selector(&)) (min-width: calc(10px));

Existing things like 10px have correct syntax highlighting even in @import statement.

Missing syntax highlighting :

  • declarations in supports()
  • selectors in supports()
  • any function

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

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.

More from microsoft/vscode-css

All issues in microsoft/vscode-css

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.