@@ -40,6 +40,7 @@ spec:css-sizing-3; type:value; for:width; text:min-content
4040spec:css-sizing-3; type:value; for:width; text:max-content
4141spec:css-syntax-3; type:dfn; text:identifier
4242spec:css-values-4; type:dfn; text:relative length
43+ spec:web-animations-1; type:dfn; text:effect values
4344</pre>
4445
4546<h2 id='intro'>
@@ -460,6 +461,68 @@ Container Queries: the ''@container'' rule</h3>
460461 so it is not always possible to merge the individual <<container-query-list>> s
461462 into a single query.
462463
464+ <h3 id="animated-containers">
465+ Animated Containers</h3>
466+
467+ A change in the evaluation of a [=container query=] must be part of a [=style change event=] ,
468+ even when the change occurred because of [=effect values|animation effects=] .
469+
470+ <div class=example>
471+ A transition on a sibling element can indirectly affect the size of a
472+ container, triggering [=style change events=] whenever container queries
473+ change their evaluation as a result:
474+
475+ <pre class=lang-css>
476+ main {
477+ display: flex;
478+ width: 300px;
479+ }
480+
481+ #container {
482+ container: inline-size;
483+ flex: 1;
484+ }
485+
486+ /* Resolved width is initially 200px, but changes as the transition
487+ on #sibling progresses. */
488+ #inner {
489+ transition: 1s background-color;
490+ background-color: tomato;
491+ }
492+
493+ /* When this container query starts (or stops) applying, a transition
494+ must start on background-color on #inner. */
495+ @container (width <= 150px) {
496+ #inner {
497+ background-color: skyblue;
498+ }
499+ }
500+
501+ #sibling {
502+ width: 100px;
503+ transition: width 1s;
504+ }
505+
506+ #sibling:hover {
507+ width: 200px;
508+ }
509+ </pre>
510+
511+ <pre class=lang-html>
512+ <main>
513+ <div id=container>
514+ <div id=inner>Inner</div>
515+ </div>
516+ <div id=sibling>Sibling</div>
517+ </main>
518+ </pre>
519+
520+ </div>
521+
522+ Changes in [=computed values=] caused by [=query length=] units
523+ must also be part of a [=style change event=] .
524+
525+
463526<h2 id="container-features">
464527Container Features</h2>
465528
0 commit comments