You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<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.
The text was updated successfully, but these errors were encountered:
If I read the current draft[1] correctly, it says that that the deepest node in the chain of nodes that gets the :hover state must be an element, and must generate a box. There is no requirement that the ancestors need to generate boxes to get the :hover state, though. So for this case:
I think the current draft leaves this totally undefined because "user designates an element" is totally undefined... I would like us to come closer to having it be defined.
I agree that in your testcase the outer display:contents should match :hover no matter how we slice this. The question is what should happen for the inner one.
Intention is definitely that it gets the hover styles, whether it's the direct parent of a text node or a grandparent. Guess I need to rephrase the "if a shadow-inclusive descendant matches :hover" to instead say "is designated by a pointing device".
Consider this testcase:
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.
The text was updated successfully, but these errors were encountered: