@@ -282,15 +282,15 @@ Container Queries</h2>
282
282
283
283
<pre class=lang-css>
284
284
main, aside {
285
- container: inline-size;
285
+ container: my-layout / inline-size;
286
286
}
287
287
288
288
.media-object {
289
289
display: grid;
290
290
grid-template: 'img' auto 'content' auto / 100%;
291
291
}
292
292
293
- @container (inline-size > 45em) {
293
+ @container my-layout (inline-size > 45em) {
294
294
.media-object {
295
295
grid-template: 'img content' auto / auto 1fr;
296
296
}
@@ -542,31 +542,35 @@ Naming Query Containers: the 'container-name' property</h3>
542
542
to use the contents of the ''data-container'' attribute when provided.
543
543
</div>
544
544
545
+ Issue(6405): container-name string vs ident
546
+
545
547
546
548
<h3 id="container-shorthand">
547
549
Creating Named Containers: the 'container' shorthand</h3>
548
550
549
551
<pre class='propdef shorthand'>
550
552
Name : container
551
- Value : <<'container-type '>> [ / <<'container-name '>> ]?
553
+ Value : <<'container-name '>>? [ / <<'container-type '>> ]?
552
554
</pre>
553
555
554
556
The 'container' [=shorthand property=] sets
555
557
both 'container-type' and 'container-name' in the same declaration.
556
558
If <<'container-name'>> is omitted,
557
559
it is reset to its [=initial value=] .
560
+ If <<'container-type'>> is omitted,
561
+ it is reset to its [=initial value=] .
558
562
559
563
<div class=example>
560
564
We can define both a 'container-type' and 'container-name'
561
565
using the shorthand syntax:
562
566
563
567
<pre class=lang-css>
564
568
main {
565
- container: size / layout ;
569
+ container: my-layout / size ;
566
570
}
567
571
568
572
.grid-item {
569
- container: inline-size / component ;
573
+ container: my-component / inline-size ;
570
574
}
571
575
</pre>
572
576
</div>
@@ -668,7 +672,7 @@ Animated Containers</h3>
668
672
}
669
673
670
674
#container {
671
- container: inline-size;
675
+ container-type : inline-size;
672
676
flex: 1;
673
677
}
674
678
@@ -993,6 +997,9 @@ Changes since the 21 December 2021 First Public Working Draft</h3>
993
997
994
998
Significant changes since the <a href="https://www.w3.org/TR/2021/WD-css-contain-3-20211221/">21 December 2021 First Public Working Draft</a> include:
995
999
1000
+ * Reverse the order of <<container-name>> and <<container-type>>
1001
+ in the 'container' shorthand property, with both being optional.
1002
+ (<a href="https://github.com/w3c/csswg-drafts/issues/6393">Issue 6393</a> )
996
1003
* Allow <<general-enclosed>> syntax in <<container-condition>> s,
997
1004
for the sake of forward compatability.
998
1005
(<a href="https://github.com/w3c/csswg-drafts/issues/6396">Issue 6396</a> )
0 commit comments