Skip to content

[selectors] Drop :target-within, deprecate :focus-within #8357

Description

@LeaVerou

:target-within and :focus-within were added to the language during an era when we thought we could never do :has(). They are special cases of :has(), namely to :has(:target) and :has(:focus). Now that we have :has(), there's no reason to have them in the language. :target-within has no implementation, so we could just drop it. :focus-within is widely used (~8% of websites) but it may make sense to deprecate so we could drop it one day, if usage drops.

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