microsoft / microsoft/vscode-css

Highlighting issue with `of :not`

Open
#22 0 comments 1 reaction 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

From https://github.com/microsoft/vscode/issues/193639

.item > div:nth-child(1 of :not(.hidden))  {
  padding-left: var(--item_margin);
}

.item > div:nth-last-child(1 of :not(.hidden)) {
  padding-right: var(--item_margin);
}

it highlights the n wrong.

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

Reproduce the highlighting problem in the CSS TextMate grammar using the selectors shown in the issue, especially of :not(.hidden). Trace how these selector fragments are tokenized; done means the n in the of :not syntax is highlighted correctly without regressing the related nth-child and nth-last-child cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
tooling
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.