Skip to content

Commit 387bbce

Browse files
authored
[selectors-4] Add CanIUse panels #1193 (#14120)
Enables Include Can I Use Panels metadata and adds caniuse=<feature> attributes on 14 headings and dfns to render browser-support panels next to each pseudo-class and selector documented in caniuse.com's database. Anchors covered: attribute-case, descendant-combinators, matches, negation, relational, the-dir-pseudo, the-any-link-pseudo, the-focus-within-pseudo, placeholder, the-default-pseudo, indeterminate-pseudo, range-pseudos, optional-pseudo, the-nth-child-pseudo. Not covered: #first-line from the original 2017 issue. The ::first-line pseudo-element is now defined in css-pseudo-4, so its CanIUse panel belongs there.
1 parent 0aa3d40 commit 387bbce

1 file changed

Lines changed: 15 additions & 14 deletions

File tree

selectors-4/Overview.bs

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Abstract: Selectors Level 4 describes the selectors that already exist in [[!SEL
2626
At Risk: [=user action pseudo-classes=] applying to non-[=tree-abiding pseudo-elements=]
2727
Ignored Terms: function token, Document, DocumentFragment, math, h1, shadow tree, querySelector(), quirks mode, button, a, span, object, p, div, q, area, link, label, input, html, em, li, ol, pre, CSS Value Definition Syntax
2828
Ignored Vars: identifier, i
29+
Include Can I Use Panels: yes
2930
Ignore MDN Failure: #blank-pseudo
3031
Ignore MDN Failure: #the-column-combinator
3132
Ignore MDN Failure: #the-future-pseudo
@@ -1453,7 +1454,7 @@ Selector Lists</h3>
14531454
</div>
14541455

14551456

1456-
<h3 id="matches">
1457+
<h3 id="matches" caniuse="css-matches-pseudo">
14571458
The Matches-Any Pseudo-class: '':is()''</h3>
14581459

14591460
<wpt>
@@ -1531,7 +1532,7 @@ The Matches-Any Pseudo-class: '':is()''</h3>
15311532
if needed for backwards-compatibility.
15321533

15331534

1534-
<h3 id="negation">
1535+
<h3 id="negation" caniuse="css-not-sel-list">
15351536
The Negation (Matches-None) Pseudo-class: '':not()''</h3>
15361537

15371538
<wpt>
@@ -1643,7 +1644,7 @@ The Specificity-adjustment Pseudo-class: '':where()''</h3>
16431644
to explicitly set the specificity of that instance of the pseudo-class.
16441645

16451646

1646-
<h3 id='relational'>
1647+
<h3 id='relational' caniuse="css-has">
16471648
The Relational Pseudo-class: '':has()''</h3>
16481649

16491650
<wpt>
@@ -2140,7 +2141,7 @@ Substring matching attribute selectors</h3>
21402141
</div>
21412142

21422143

2143-
<h3 id="attribute-case">
2144+
<h3 id="attribute-case" caniuse="css-case-insensitive">
21442145
Case-sensitivity</h3>
21452146

21462147
<wpt>
@@ -2460,7 +2461,7 @@ ID selectors</h3>
24602461
<h2 id="linguistic-pseudos">
24612462
Linguistic Pseudo-classes</h2>
24622463

2463-
<h3 id="the-dir-pseudo">
2464+
<h3 id="the-dir-pseudo" caniuse="css-dir-pseudo">
24642465
The Directionality Pseudo-class: '':dir()''</h3>
24652466

24662467
<wpt>
@@ -2738,7 +2739,7 @@ The Language Pseudo-class: '':lang()''</h3>
27382739
<h2 id="location">
27392740
Location Pseudo-classes</h2>
27402741

2741-
<h3 id="the-any-link-pseudo">
2742+
<h3 id="the-any-link-pseudo" caniuse="css-any-link">
27422743
The Hyperlink Pseudo-class: '':any-link''</h3>
27432744

27442745
<wpt>
@@ -3182,7 +3183,7 @@ The Focus-Indicated Pseudo-class: '':focus-visible''</h3>
31823183
the default '':focus'' style.
31833184

31843185

3185-
<h3 id="the-focus-within-pseudo">
3186+
<h3 id="the-focus-within-pseudo" caniuse="css-focus-within">
31863187
The Focus Container Pseudo-class: '':focus-within''</h3>
31873188

31883189
<wpt>
@@ -3461,7 +3462,7 @@ The Mutability Pseudo-classes: '':read-only'' and '':read-write''</h4>
34613462
For example, in [[HTML5]] a <a href="https://html.spec.whatwg.org/multipage/semantics-other.html#selector-read-only">non-disabled non-readonly <code>&lt;input></code> element</a> is '':read-write'',
34623463
as is any element with the <code>contenteditable</code> attribute set to the true state.
34633464

3464-
<h4 id="placeholder">
3465+
<h4 id="placeholder" caniuse="css-placeholder-shown">
34653466
The Placeholder-shown Pseudo-class: '':placeholder-shown''</h4>
34663467

34673468
<wpt>
@@ -3496,7 +3497,7 @@ The Automatic Input Pseudo-class: '':autofill''</h4>
34963497
that have been automatically filled by the user agent,
34973498
and have not been subsequently altered by the user.
34983499

3499-
<h4 id="the-default-pseudo">
3500+
<h4 id="the-default-pseudo" caniuse="css-default-pseudo">
35003501
The Default-option Pseudo-class: '':default''</h4>
35013502

35023503
The <dfn id='default-pseudo'>:default</dfn> pseudo-class applies to the one or more UI elements
@@ -3530,7 +3531,7 @@ The Selected-option Pseudo-classes: '':checked'', '':unchecked'', and '':indeter
35303531

35313532
If an element that <em>could</em> match '':checked'' or '':unchecked''
35323533
is neither "on" nor "off",
3533-
the <dfn id='indeterminate-pseudo'>:indeterminate</dfn> pseudo-class applies.
3534+
the <dfn id='indeterminate-pseudo' caniuse="css-indeterminate-pseudo">:indeterminate</dfn> pseudo-class applies.
35343535
'':indeterminate'' also matches elements which do not have a notion of being "checked",
35353536
but whose "value" is still in an indeterminate state,
35363537
such as a progress meter whose progress percentage is unknown.
@@ -3600,7 +3601,7 @@ The Validity Pseudo-classes: '':valid'' and '':invalid''</h4>
36003601
invalidation/media-loading-pseudo-classes-in-has.sub.html
36013602
</wpt>
36023603

3603-
<h4 id="range-pseudos">
3604+
<h4 id="range-pseudos" caniuse="css-in-out-of-range">
36043605
The Range Pseudo-classes: '':in-range'' and '':out-of-range''</h4>
36053606

36063607
The <dfn id="in-range-pseudo">:in-range</dfn> and
@@ -3626,7 +3627,7 @@ The Optionality Pseudo-classes: '':required'' and '':optional''</h4>
36263627
</wpt>
36273628

36283629
A form element is <dfn id="required-pseudo">:required</dfn> or
3629-
<dfn id="optional-pseudo">:optional</dfn>
3630+
<dfn id="optional-pseudo" caniuse="css-optional-pseudo">:optional</dfn>
36303631
if a value for it is, respectively, required or optional before the
36313632
form it belongs to can be validly submitted. Elements that are not
36323633
form elements are neither required nor optional.
@@ -3869,7 +3870,7 @@ Child-indexed Pseudo-classes</h3>
38693870
or with non-element parents,
38703871
they have been rephrased to refer to an element's relative index amongst its siblings.
38713872

3872-
<h4 id="the-nth-child-pseudo">
3873+
<h4 id="the-nth-child-pseudo" caniuse="css-nth-child-of">
38733874
'':nth-child()'' pseudo-class</h4>
38743875

38753876
<wpt>
@@ -4229,7 +4230,7 @@ Typed Child-indexed Pseudo-classes</h3>
42294230
<h2 id="combinators">
42304231
Combinators</h2>
42314232

4232-
<h3 id="descendant-combinators">
4233+
<h3 id="descendant-combinators" caniuse="css-descendant-gtgt">
42334234
Descendant combinator (<code> </code>)</h3>
42344235

42354236
<wpt>

0 commit comments

Comments
 (0)