Microsoft/vscode

[scss] selector specificity works wrong with nested selectors

Open

#63,200 建立於 2018年11月15日

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

描述

Issue Type: Bug

Css specifity calculator doesn't respect nested selectors or selectors with &.

#id {} /* (1, 0, 0) */

#id div {} /* (1, 0, 1) */
#id {
  div { /* (0, 0, 1) */
  }
}

.block{ /* (0, 1, 0) */
  &__element { /* (0, 0, 0) */
  }
}

Reproduced without any extensions

VS Code version: Code 1.29.0 (5f24c93878bd4bc645a4a17c620e2487b11005f9, 2018-11-12T07:47:15.448Z) OS version: Windows_NT x64 10.0.17134

貢獻者指南