Skip to content

Commit 3be27da

Browse files
committed
[css-contain-3][editorial] Cleanup examples and issues
1 parent ae62deb commit 3be27da

1 file changed

Lines changed: 48 additions & 42 deletions

File tree

css-contain-3/Overview.bs

Lines changed: 48 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -334,20 +334,20 @@ Container Queries</h2>
334334
A ::before selector querying the size of the originating element:
335335

336336
<pre class=lang-html>
337-
&lt;style>
338-
#container {
339-
width: 100px;
340-
container-type: inline-size;
341-
}
342-
@container (inline-size < 150px) {
343-
#inner::before {
344-
content: "BEFORE";
345-
}
346-
}
347-
&lt;/style>
348-
&lt;div id=container>
349-
&lt;span id=inner>&lt;/span>
350-
&lt;/div>
337+
&lt;style>
338+
#container {
339+
width: 100px;
340+
container-type: inline-size;
341+
}
342+
@container (inline-size < 150px) {
343+
#inner::before {
344+
content: "BEFORE";
345+
}
346+
}
347+
&lt;/style>
348+
&lt;div id=container>
349+
&lt;span id=inner>&lt;/span>
350+
&lt;/div>
351351
</pre>
352352
</div>
353353

@@ -356,28 +356,35 @@ Container Queries</h2>
356356
container in the shadow tree:
357357

358358
<pre class=lang-html>
359-
&lt;div id=host style="width:200px">
360-
&lt;template shadowroot=open>
361-
&lt;style>
362-
#container {
363-
width: 100px;
364-
container-type: inline-size;
365-
}
366-
@container (inline-size < 150px) {
367-
::slotted(span) {
368-
color: green;
369-
}
370-
}
371-
&lt;/style>
372-
&lt;div id=container>
373-
&lt;slot />
374-
&lt;/div>
375-
&lt;/template>
376-
&lt;span id=slotted>Green&lt;/span>
377-
&lt;/div>
359+
&lt;div id=host style="width:200px">
360+
&lt;template shadowroot=open>
361+
&lt;style>
362+
#container {
363+
width: 100px;
364+
container-type: inline-size;
365+
}
366+
@container (inline-size < 150px) {
367+
::slotted(span) {
368+
color: green;
369+
}
370+
}
371+
&lt;/style>
372+
&lt;div id=container>
373+
&lt;slot />
374+
&lt;/div>
375+
&lt;/template>
376+
&lt;span id=slotted>Green&lt;/span>
377+
&lt;/div>
378378
</pre>
379379
</div>
380380

381+
Issue(6376): Bikeshed terms/property names to avoid confusion
382+
with other usage of “contain” and “container”?
383+
384+
Issue(6205): Container Queries should have a matchContainer method
385+
386+
Issue(7033): Add CSSOM API for CSSContainerRule
387+
381388
<h3 id="container-type">
382389
Creating Query Containers: the 'container-type' property</h3>
383390

@@ -397,9 +404,6 @@ Creating Query Containers: the 'container-type' property</h3>
397404
to query various aspects of its sizing, layout, and style
398405
and respond accordingly.
399406

400-
Issue(6376): Bikeshed terms/property names to avoid confusion
401-
with other usage of “contain” and “container”?
402-
403407
Values have the following meanings:
404408

405409
<dl dfn-type=value dfn-for=container-type>
@@ -465,6 +469,8 @@ Creating Query Containers: the 'container-type' property</h3>
465469
</pre>
466470
</div>
467471

472+
Issue(7066): Should all elements default to a style container-type?
473+
468474

469475
<h3 id="container-name">
470476
Naming Query Containers: the 'container-name' property</h3>
@@ -510,19 +516,19 @@ Naming Query Containers: the 'container-name' property</h3>
510516
<pre class=lang-css>
511517
main {
512518
container-type: size;
513-
container-name: page-layout;
519+
container-name: my-page-layout;
514520
}
515521

516522
.my-component {
517523
container-type: inline-size;
518-
container-name: component-library;
524+
container-name: my-component-library;
519525
}
520526

521-
@container page-layout (block-size > 12em) {
527+
@container my-page-layout (block-size > 12em) {
522528
.card { margin-block: 2em; }
523529
}
524530

525-
@container component-library (inline-size > 30em) {
531+
@container my-component-library (inline-size > 30em) {
526532
.card { margin-inline: 2em; }
527533
}
528534
</pre>
@@ -654,6 +660,8 @@ Container Queries: the ''@container'' rule</h3>
654660
so it is not always possible to merge the individual <<container-condition>>s
655661
into a single query.
656662

663+
Issue(6827): What happens to other @rules inside @container?
664+
657665
<h3 id="animated-containers">
658666
Animated Containers</h3>
659667

@@ -896,8 +904,6 @@ Style Container Features</h3>
896904
is the same as for [=CSS feature queries=].
897905
(See ''@supports''. [[!CSS-CONDITIONAL-3]])
898906

899-
Issue(6396): Do we like this proposed syntax for style queries?
900-
901907

902908
<h2 id="container-lengths">
903909
Container Relative Lengths: the ''cqw'', ''cqh'', ''cqi'', ''cqb'', ''cqmin'', ''cqmax'' units</h2>

0 commit comments

Comments
 (0)