Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Specificity is miscalculated for nested selectors #161

@C-Ezra-M

Description

@C-Ezra-M
  • VS Code Version: 1.70.2
  • SCSS IntelliSense Version: v0.10.0
  • Operating System: Windows 11 Version 21H2 Build 22000.856

Reproducible Case:

This SCSS code snippet.

.toc {
  #left-col & {
    @media screen and (min-width: 960px) {
      display: none;
    }
  }
}

Steps to Reproduce:

  1. Copy-paste the above code snippet.
  2. Hover over #left-col &.

Expected: The specificity is calculated as (1, 1, 0).
Actual: The specificity is calculated as (1, 0, 0), ignoring the toc class's specificity.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions