Skip to content

[selectors-4] new :hover top-layer rule breaks body:has(:hover) when the top-layer is a pseudo-element like ::picker() #13153

@sb3nder

Description

@sb3nder

If ::picker() itself matches :hover, and:

  • its child elements (not pseudo-elements) do not.
  • ::picker() has no child elements, only pseudo-elements (as might be the case in future base picker implementations).

body:has(:hover) won't match.

Example structure:

<body>
  ...
  <parent>
    ::picker()
  </parent>
  ...
</body>

Test: https://codepen.io/sb3nder/pen/EaKVdOQ

2025-11-25.15-53-54.mp4

related: #11185

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