Skip to content

[selectors-4] Can an element with no boxes and no child elements be in :hover state? #1141

@bzbarsky

Description

@bzbarsky

Consider this testcase:

<style>
  div { display: contents }
  div:hover { color: purple }
</style>
<div>This is some text</div>

When hovering over the text, does it turn purple? The spec is pretty unclear on when an element is actually "designated with a pointing device" and what that means for display:contents elements, exactly. Note that in this case there are no descendants of any sort matching :hover, because text nodes do not match :hover themselves.

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