Skip to content

Fix selector-no-qualifying-type false positives for :has() #9103

@stof

Description

@stof

What minimal example or steps are needed to reproduce the bug?

.form-field:has(input:disabled) {
    color: gray;
}

What minimal configuration is needed to reproduce the bug?

{
  "rules": {
    "selector-no-qualifying-type": true
  }
}

How did you run Stylelint?

Demo

Which Stylelint-related dependencies are you using?

{
    "stylelint": "^17.3.0",
    "stylelint-config-standard-scss": "^17.0.0",
}

What did you expect to happen?

No error reported. :has(input) is not qualifying the current element. It applies a condition on child nodes.

What actually happened?

This problem is reported:

1:17-22
    error
    Unexpected qualifying type selector "input" in ".form-field:has(input:disabled)" (selector-no-qualifying-type)

Do you have a proposal to fix the bug?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: wipis being worked on by someone

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions