Skip to content

[css-scoping] Allow sibling combinators for ::slotted elements #5094

@GeorgeTailor

Description

@GeorgeTailor

I am not sure if it's a feature request or a bug as spec does not cover this case.
Anyway, the proposal is to allow sibling combinators (+, ~) for ::slotted elements, for example:

::slotted(input[type="checkbox"]:disabled) + ::slotted(label) {
  cursor: not-allowed;
}

I know that child and descendant combinators are not allowed due to performance reasons, but sibling combinator does not seem that it would introduce a lot of performance overhead.
Since we already can apply style to all slotted elements, why not allow sibling combinators as well?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions