@@ -45,6 +45,8 @@ WPT Display: closed
45
45
spec:css-contain-2; type:dfn; text:layout containment box
46
46
spec:css-contain-2; type:dfn; text:size containment box
47
47
spec:css-pseudo-4; type:dfn; text:fictional tag sequence
48
+ spec:css-pseudo-4; type:selector; text:::file-selector-button
49
+ spec:css-pseudo-4; type:selector; text:::placeholder
48
50
spec:css-scroll-snap-2; type:dfn; text:scrollsnapchanging
49
51
spec:css-sizing-4; type:property; text:contain-intrinsic-size
50
52
spec:css-sizing-4; type:property; text:aspect-ratio
@@ -110,7 +112,7 @@ Extensions to the ''@supports'' rule</h2>
110
112
111
113
<pre class="prod def" nohighlight>
112
114
<dfn><supports-feature></dfn> = <<supports-selector-fn>> | <<supports-font-tech-fn>>
113
- | <<supports-font-format-fn>> | <<supports-decl>>
115
+ | <<supports-font-format-fn>> | <<supports-decl>>
114
116
<dfn><supports-font-tech-fn></dfn> = font-tech( <<font-tech>> )
115
117
<dfn><supports-font-format-fn></dfn> = font-format( <<font-format>> )
116
118
</pre>
@@ -198,7 +200,7 @@ Chained Conditionals: the ''@else'' rule</h2>
198
200
199
201
The <dfn>@else</dfn> rule is a [=conditional group rule=]
200
202
used to form [=conditional rule chains=] ,
201
- which associate multiple [=conditional rules=]
203
+ which associate multiple [=conditional group rules=]
202
204
and guarantee that only the first one that matches
203
205
will evaluate its condition as true.
204
206
It is defined as:
@@ -262,23 +264,23 @@ Chained Conditionals: the ''@else'' rule</h2>
262
264
<pre class="lang-css">
263
265
@media (width >= 400px) and (pointer: fine) {
264
266
@supports (display: flex) {
265
- /* A */
267
+ /* A */
266
268
}
267
269
@supports not (display: flex) {
268
- @supports (caret-color: pink) and (background: double-rainbow()) {
269
- /* B */
270
- }
271
- @supports not ((caret-color: pink) and (background: double-rainbow())) {
272
- /* C */
273
- }
270
+ @supports (caret-color: pink) and (background: double-rainbow()) {
271
+ /* B */
272
+ }
273
+ @supports not ((caret-color: pink) and (background: double-rainbow())) {
274
+ /* C */
275
+ }
274
276
}
275
277
}
276
278
@media not ((width >= 400px) and (pointer: fine)) {
277
279
@supports (caret-color: pink) and (background: double-rainbow()) {
278
- /* B */
280
+ /* B */
279
281
}
280
282
@supports not ((caret-color: pink) and (background: double-rainbow())) {
281
- /* C */
283
+ /* C */
282
284
}
283
285
}
284
286
</pre>
@@ -384,7 +386,7 @@ Container Queries</h2>
384
386
385
387
@container my-layout (inline-size > 45em) {
386
388
.media-object {
387
- grid-template: 'img content' auto / auto 1fr;
389
+ grid-template: 'img content' auto / auto 1fr;
388
390
}
389
391
}
390
392
</pre>
@@ -423,13 +425,13 @@ Container Queries</h2>
423
425
<pre class=lang-html>
424
426
<style>
425
427
#container {
426
- width: 100px;
427
- container-type: inline-size;
428
+ width: 100px;
429
+ container-type: inline-size;
428
430
}
429
431
@container (inline-size < 150px) {
430
- #inner::before {
431
- content: "BEFORE";
432
- }
432
+ #inner::before {
433
+ content: "BEFORE";
434
+ }
433
435
}
434
436
</style>
435
437
<div id=container>
@@ -445,20 +447,20 @@ Container Queries</h2>
445
447
<pre class=lang-html>
446
448
<div id=host style="width:200px">
447
449
<template shadowroot=open>
448
- <style>
449
- #container {
450
- width: 100px;
451
- container-type: inline-size;
452
- }
453
- @container (inline-size < 150px) {
454
- ::slotted(span) {
455
- color: green;
456
- }
457
- }
458
- </style>
459
- <div id=container>
460
- <slot />
461
- </div>
450
+ <style>
451
+ #container {
452
+ width: 100px;
453
+ container-type: inline-size;
454
+ }
455
+ @container (inline-size < 150px) {
456
+ ::slotted(span) {
457
+ color: green;
458
+ }
459
+ }
460
+ </style>
461
+ <div id=container>
462
+ <slot />
463
+ </div>
462
464
</template>
463
465
<span id=slotted>Green</span>
464
466
</div>
@@ -504,11 +506,11 @@ Creating Query Containers: the 'container-type' property</h3>
504
506
and establishes an [=independent formatting context=] .
505
507
<dt> <dfn>scroll-state</dfn>
506
508
<dd>
507
- Establishes a [=query container=] for [=scroll-state queries=]
509
+ Establishes a [=query container=] for [=container scroll-state queries=]
508
510
<dt> <dfn>normal</dfn>
509
511
<dd>
510
512
The element is not a [=query container=]
511
- for any [=container size queries=] or [=scroll-state queries=] ,
513
+ for any [=container size queries=] or [=container scroll-state queries=] ,
512
514
but remains a [=query container=] for [=container style queries=] .
513
515
</dl>
514
516
@@ -541,9 +543,9 @@ Creating Query Containers: the 'container-type' property</h3>
541
543
<pre class=lang-css>
542
544
@container style(--cards: small) {
543
545
article {
544
- border: thin solid silver;
545
- border-radius: 0.5em;
546
- padding: 1em;
546
+ border: thin solid silver;
547
+ border-radius: 0.5em;
548
+ padding: 1em;
547
549
}
548
550
}
549
551
</pre>
@@ -561,7 +563,7 @@ Creating Query Containers: the 'container-type' property</h3>
561
563
}
562
564
@container scroll-state(stuck: top) {
563
565
#sticky-child {
564
- background-color: lime;
566
+ background-color: lime;
565
567
}
566
568
}
567
569
</pre>
@@ -932,33 +934,33 @@ Container Queries: the ''@container'' rule</h3>
932
934
<dfn><<container-condition>></dfn> = [ <<container-name>> ? <<container-query>> ? ]!
933
935
<dfn><<container-name>></dfn> = <<custom-ident>>
934
936
<dfn><<container-query>></dfn> = not <<query-in-parens>>
935
- | <<query-in-parens>> [ [ and <<query-in-parens>> ]* | [ or <<query-in-parens>> ]* ]
937
+ | <<query-in-parens>> [ [ and <<query-in-parens>> ]* | [ or <<query-in-parens>> ]* ]
936
938
<dfn><<query-in-parens>></dfn> = ( <<container-query>> )
937
- | ( <<size-feature>> )
938
- | style( <<style-query>> )
939
- | scroll-state( <<scroll-state-query>> )
940
- | <<general-enclosed>>
939
+ | ( <<size-feature>> )
940
+ | style( <<style-query>> )
941
+ | scroll-state( <<scroll-state-query>> )
942
+ | <<general-enclosed>>
941
943
942
944
<dfn><<style-query>></dfn> = not <<style-in-parens>>
943
- | <<style-in-parens>> [ [ and <<style-in-parens>> ]* | [ or <<style-in-parens>> ]* ]
944
- | <<style-feature>>
945
+ | <<style-in-parens>> [ [ and <<style-in-parens>> ]* | [ or <<style-in-parens>> ]* ]
946
+ | <<style-feature>>
945
947
<dfn><<style-in-parens>></dfn> = ( <<style-query>> )
946
- | ( <<style-feature>> )
947
- | <<general-enclosed>>
948
+ | ( <<style-feature>> )
949
+ | <<general-enclosed>>
948
950
<dfn><<style-feature>></dfn> = <<style-feature-plain>> | <<style-feature-boolean>> | <<style-range>>
949
951
<dfn><<style-feature-plain>></dfn> = <<style-feature-name>> : <<style-feature-value>>
950
952
<dfn><<style-feature-boolean>></dfn> = <<style-feature-name>>
951
953
<dfn><<style-range>></dfn> = <<style-range-value>> <<mf-comparison>> <<style-range-value>>
952
- | <<style-range-value>> <<mf-lt>> <<style-range-value>> <<mf-lt>> <<style-range-value>>
953
- | <<style-range-value>> <<mf-gt>> <<style-range-value>> <<mf-gt>> <<style-range-value>>
954
+ | <<style-range-value>> <<mf-lt>> <<style-range-value>> <<mf-lt>> <<style-range-value>>
955
+ | <<style-range-value>> <<mf-gt>> <<style-range-value>> <<mf-gt>> <<style-range-value>>
954
956
<dfn><<style-range-value>></dfn> = <<custom-property-name>> | <<style-feature-value>>
955
957
956
958
<dfn><<scroll-state-query>></dfn> = not <<scroll-state-in-parens>>
957
- | <<scroll-state-in-parens>> [ [ and <<scroll-state-in-parens>> ]* | [ or <<scroll-state-in-parens>> ]* ]
958
- | <<scroll-state-feature>>
959
+ | <<scroll-state-in-parens>> [ [ and <<scroll-state-in-parens>> ]* | [ or <<scroll-state-in-parens>> ]* ]
960
+ | <<scroll-state-feature>>
959
961
<dfn><<scroll-state-in-parens>></dfn> = ( <<scroll-state-query>> )
960
- | ( <<scroll-state-feature>> )
961
- | <<general-enclosed>>
962
+ | ( <<scroll-state-feature>> )
963
+ | <<general-enclosed>>
962
964
</pre>
963
965
964
966
The keywords ''container-name/none'' , ''and'' , ''not'' , and ''or''
@@ -1051,7 +1053,7 @@ Container Queries: the ''@container'' rule</h3>
1051
1053
<pre class=lang-css>
1052
1054
@container card (inline-size > 30em) {
1053
1055
@container style(--responsive: true) {
1054
- /* styles */
1056
+ /* styles */
1055
1057
}
1056
1058
}
1057
1059
</pre>
@@ -1102,7 +1104,7 @@ Animated Containers</h3>
1102
1104
must start on background-color on #inner. */
1103
1105
@container (width <= 150px) {
1104
1106
#inner {
1105
- background-color: skyblue;
1107
+ background-color: skyblue;
1106
1108
}
1107
1109
}
1108
1110
@@ -1119,7 +1121,7 @@ Animated Containers</h3>
1119
1121
<pre class=lang-html>
1120
1122
<main>
1121
1123
<div id=container>
1122
- <div id=inner>Inner</div>
1124
+ <div id=inner>Inner</div>
1123
1125
</div>
1124
1126
<div id=sibling>Sibling</div>
1125
1127
</main>
@@ -1488,7 +1490,7 @@ Scroll snapping: the '@container/snapped' feature</h4>
1488
1490
</pre>
1489
1491
1490
1492
The '@container/snapped' [=container feature=] queries whether a [=snap target=]
1491
- is, or would be, snapped to its [=snap container=] , in the given axis. That is,
1493
+ is, or would be, snapped to its [=scroll snap container=] , in the given axis. That is,
1492
1494
it matches any [=snap target=] that the {{scrollsnapchanging}} event is fired for.
1493
1495
1494
1496
<dl dfn-type=value dfn-for="@container/snapped">
@@ -1497,27 +1499,27 @@ Scroll snapping: the '@container/snapped' feature</h4>
1497
1499
The [=query container=] is not a [=snap target=] .
1498
1500
<dt> <dfn>x</dfn>
1499
1501
<dd>
1500
- '@container/snapped' [=container feature=] matches ''x''
1502
+ '@container/snapped' [=container feature=] matches ''@container/snapped/ x''
1501
1503
if the [=query container=] is a horizontal [=snap target=] for its [=scroll container=] .
1502
1504
<dt> <dfn>y</dfn>
1503
1505
<dd>
1504
- '@container/snapped' [=container feature=] matches ''y''
1506
+ '@container/snapped' [=container feature=] matches ''@container/snapped/ y''
1505
1507
if the [=query container=] is a vertical [=snap target=] for its [=scroll container=] .
1506
1508
<dt> <dfn>block</dfn>
1507
1509
<dd>
1508
- '@container/snapped' [=container feature=] matches ''block''
1510
+ '@container/snapped' [=container feature=] matches ''@container/snapped/ block''
1509
1511
if the [=query container=] is a [=snap target=] for its [=scroll container=] .
1510
- in the block direction of the [=snap container=] .
1512
+ in the block direction of the [=scroll snap container=] .
1511
1513
<dt> <dfn>inline</dfn>
1512
1514
<dd>
1513
- '@container/snapped' [=container feature=] matches ''inline''
1515
+ '@container/snapped' [=container feature=] matches ''@container/snapped/ inline''
1514
1516
if the [=query container=] is a [=snap target=] for its [=scroll container=]
1515
- in the inline direction of the [=snap container=] .
1517
+ in the inline direction of the [=scroll snap container=] .
1516
1518
<dt> <dfn>both</dfn>
1517
1519
<dd>
1518
1520
'@container/snapped' [=container feature=] matches ''both''
1519
1521
if the [=query container=] is a [=snap target=] for its [=scroll container=]
1520
- in both directions of the [=snap container=] .
1522
+ in both directions of the [=scroll snap container=] .
1521
1523
</dl>
1522
1524
1523
1525
<h4 id="scrollable">
@@ -1663,8 +1665,8 @@ The <code>CSSContainerRule</code> interface</h3>
1663
1665
<pre class='idl'>
1664
1666
[Exposed=Window]
1665
1667
interface CSSContainerRule : CSSConditionRule {
1666
- readonly attribute CSSOMString containerName;
1667
- readonly attribute CSSOMString containerQuery;
1668
+ readonly attribute CSSOMString containerName;
1669
+ readonly attribute CSSOMString containerQuery;
1668
1670
};
1669
1671
</pre>
1670
1672
@@ -1756,7 +1758,7 @@ Changes since the <a href="https://www.w3.org/TR/2024/WD-css-conditional-5-20240
1756
1758
1757
1759
<ul>
1758
1760
<!-- To 31 Oct 2024 -->
1759
- <li> Add 'none' -keywords to scroll-state() features (<a href="https://github.com/w3c/csswg-drafts/pull/10874">#10874</a> )</li>
1761
+ <li> Add ''@container/stuck/ none' ' -keywords to scroll-state() features (<a href="https://github.com/w3c/csswg-drafts/pull/10874">#10874</a> )</li>
1760
1762
<li> Added container-type:scroll-state, and scroll-state() queries for stuck, snapped, and scrollable features
1761
1763
(<a href="https://github.com/w3c/csswg-drafts/issues/6402#issuecomment-1812973013">#6402</a> ,
1762
1764
<a href="https://github.com/w3c/csswg-drafts/issues/10784#issuecomment-2379901508">#10784</a> ,
0 commit comments