Skip to content

Commit 03b340c

Browse files
committed
[selectors-4] Per resolution, remove :target-within and replace it with a note about :has(:target). #8357
1 parent 4b99537 commit 03b340c

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

selectors-4/Overview.bs

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -271,11 +271,6 @@ Selectors Overview</h2>
271271
<td>an E element being the target of the current URL
272272
<td>[[#the-target-pseudo]]
273273
<td>3
274-
<tr>
275-
<td><code>E:target-within</code>
276-
<td>an E element that is the target of the current URL or contains an element that does.
277-
<td>[[#the-target-within-pseudo]]
278-
<td>4
279274
<tr>
280275
<td><code>E:scope</code>
281276
<td>an E element being a [=scoping root=]
@@ -2231,7 +2226,7 @@ The Local Link Pseudo-class: '':local-link''</h3>
22312226
markup instructions such as <code>&lt;meta http-equiv="..."></code>,
22322227
or scripting instructions <!-- such as ? -->).
22332228
UAs must ensure that '':local-link'',
2234-
as well as the '':target'' and '':target-within'' pseudo-classes below,
2229+
as well as the '':target'' pseudo-class below,
22352230
respond correctly to all such changes in state.
22362231

22372232
<h3 id="the-target-pseudo">
@@ -2274,14 +2269,11 @@ The Target Pseudo-class: '':target''</h3>
22742269
</pre>
22752270
</div>
22762271

2277-
<h3 id="the-target-within-pseudo">
2278-
The Target Container Pseudo-class: '':target-within''</h3>
2272+
Note: This specification previously defined a <css>:target-within</css> pseudo-class,
2273+
analogous to '':focus-within''.
2274+
It was removed in favor of '':has(:target)'',
2275+
which should hopefully suffice to solve the same use-cases.
22792276

2280-
The <dfn id='target-within-pseudo'>:target-within</dfn> pseudo-class
2281-
applies to any element to which the '':target'' pseudo-class applies
2282-
as well as to any element whose descendant in the <a>flat tree</a>
2283-
(including non-element nodes, such as text nodes)
2284-
matches the conditions for matching '':target''.
22852277

22862278
<h3 id="the-scope-pseudo">
22872279
The Reference Element Pseudo-class: '':scope''</h3>

0 commit comments

Comments
 (0)