Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Support CSS :has() pseudo-class #4457

Open
1 of 2 tasks
HaluanUskoa opened this issue Apr 3, 2024 · 1 comment
Open
1 of 2 tasks

[Bug] Support CSS :has() pseudo-class #4457

HaluanUskoa opened this issue Apr 3, 2024 · 1 comment

Comments

@HaluanUskoa
Copy link

Reproducible in vscode.dev or in VS Code Desktop?

  • Not reproducible in vscode.dev or VS Code Desktop

Reproducible in the monaco editor playground?

Monaco Editor Playground Link

Playground

Monaco Editor Playground Code

HTML:

<div id="container" style="height: 100%">
    <h1>I am an H1</h1>
    <span>I am a span</span>
</div>

CSS:

h1:has(~ span)
{
  color: red;
}

Reproduction Steps

Use the :has() pseudo-class with a selector function to trigger the syntax error.

Actual (Problematic) Behavior

Functionally, the code behaves as expected. However, the editor displays the following syntax error:

) expectedcss(css-rparentexpected)
<h1 :has>
⋮
<span>
[Selector Specificity](https://microsoft.github.io/monaco-editor/playground.html?source=v0.47.0): (0, 0, 2)

Expected Behavior

There should be no syntax error, similar to using the exact same code in VS Code.

Additional Context

VS Code has resolved this in issue #147353.

@j4k0xb
Copy link

j4k0xb commented Apr 7, 2024

duplicate: #4071

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants