Skip to content

[selectors4] ":scope" inside ":matches"-like funktions? #3108

@nuxodin

Description

@nuxodin

Wouldn't it be useful in ":maches"-like functions to have a reference to the current scope?

:matches https://www.w3.org/TR/selectors-4/#matches-pseudo
:scope https://www.w3.org/TR/selectors-4/#scope-pseudo

Instead of this:

button.superTheme,
.superTheme button {
    color:white;
    background:black;
}

one could write:

button:matches(.superTheme .superTheme :scope)

I hope I'm not writing completely stupid stuff. :)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions