Microsoft/vscode

[css] Wrong selector hover when using :has()

Open

#191.897 aperta il 31 ago 2023

Vedi su GitHub
 (1 commento) (0 reazioni) (1 assegnatario)TypeScript (10.221 fork)batch import
bugcss-less-scsshelp wanted

Metriche repository

Star
 (74.848 star)
Metriche merge PR
 (Merge medio 11h 43m) (1000 PR mergiate in 30 g)

Descrizione

Type: Bug

Set language to CSS.

Put this code:

article:has(.alert) {
	color: crimson;
}

Hover over article:has(.alert).

This dialog shows a wrong HTML example:

<article :has>

Instead, it could be:

<article>
  <div class="alert"></div>
</article>

VS Code version: Code 1.80.1 (74f6148eb9ea00507ec113ec51c489d6ffb4b771, 2023-07-12T17:20:58.115Z) OS version: Darwin arm64 21.6.0 Modes: Restricted

Guida contributor