Microsoft/vscode

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

Open

#191,897 建立於 2023年8月31日

在 GitHub 查看
 (1 留言) (0 反應) (1 負責人)TypeScript (10,221 fork)batch import
bugcss-less-scsshelp wanted

倉庫指標

Star
 (74,848 star)
PR 合併指標
 (平均合併 11小時 43分鐘) (30 天內合併 1,000 個 PR)

描述

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

貢獻者指南