Skip to content

Commit 0474327

Browse files
committed
[selectors-4] Define that :hover/etc match on the *flat-tree* ancestors, up to the first top-layer element. #11185
1 parent 03b340c commit 0474327

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

selectors-4/Overview.bs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2318,7 +2318,7 @@ User Action Pseudo-classes</h2>
23182318
for the selection of an element the user is acting on.
23192319
(In non-interactive user agents, these pseudo-classes are valid, but never match any element.)
23202320

2321-
These pseudo-classes are not mutually exclusive.
2321+
The [=user action pseudo-classes=] are not mutually exclusive.
23222322
An element can match several such pseudo-classes at the same time.
23232323

23242324
<div class="example">
@@ -2333,6 +2333,16 @@ User Action Pseudo-classes</h2>
23332333
</pre>
23342334
</div>
23352335

2336+
Some [=user action pseudo-classes=],
2337+
in addition to matching on the particular element with the property in question,
2338+
match on that element's ancestors as well:
2339+
'':hover'', '':active'', '':focus-within''.
2340+
Specifically, if these match on a given element,
2341+
they also match on the element's [=flat-tree=] ancestors,
2342+
up to and including the first [=top layer=] element
2343+
or the [=root=] element,
2344+
whichever is encountered first.
2345+
23362346
Note: The specifics of hit-testing,
23372347
necessary to know when several of the pseudo-classes defined in this section apply,
23382348
are not yet defined,

0 commit comments

Comments
 (0)