@@ -353,7 +353,7 @@ Container Queries</h2>
353
353
for [=container size queries=] by specifying
354
354
the additional query types using the 'container-type' property
355
355
(or the 'container' [=shorthand=] ).
356
- Style rules applying to a [=query container=] ’s <a>shadow-including descendants</a>
356
+ Style rules applying to a [=query container=] ’s [=flat tree=] descendants
357
357
can be conditioned by querying against it,
358
358
using the ''@container'' [=conditional group rule=] .
359
359
@@ -383,30 +383,25 @@ Container Queries</h2>
383
383
will each respond to their own container context.
384
384
</div>
385
385
386
- For selectors with pseudo elements, query containers can be established by
387
- the <a>shadow-including inclusive ancestors</a> of the <a>ultimate
388
- originating element</a> .
386
+ For the ''::part()'' and ''::slotted()'' <a>pseudo-element</a> selectors,
387
+ which represent real elements in the DOM tree, query containers can be
388
+ established by [=flat tree=] ancestors of those elements.
389
+ For other <a>pseudo-element</a> s, query containers can be established by
390
+ inclusive [=flat tree=] ancestors of their <a>originating element</a> .
389
391
390
392
<div class=note>
391
393
It follows that:
392
394
393
- * Pseudo elements themselves can not be query containers
394
395
* ''::before'' , ''::after'' , ''::marker'' , and ''::backdrop'' query their
395
396
originating elements
396
397
* ''::first-letter'' and ''::first-line'' query their originating elements,
397
398
even if the <a>fictional tag sequence</a> may push the
398
399
<code> ::first-line</code> past other elements for the purpose of
399
400
inheritance and rendering
400
- * Multiple pseudo elements do not allow pseudo elements to be query
401
- containers for other pseudo elements. E.g., the host, but not the
402
- <code> ::part()</code> , can be the query container for
403
- <code> ::before</code> in <code> host::part()::before</code> . Similarly,
404
- <code> ::before</code> can not be the query container for the
405
- <code> ::marker</code> in <code> div::before::marker</code>
406
401
* ''::slotted()'' selectors can query containers inside the shadow tree,
407
402
including the slot itself
408
- * ''::part() '' selectors can query its originating host, but not internal
409
- query containers inside the shadow tree
403
+ * ''::slotted()::before '' selectors can query the slotted shadow host child
404
+ * ''::part()'' selectors can query containers inside the shadow tree
410
405
* ''::placeholder'' and ''::file-selector-button'' can query the input
411
406
element, but do not expose any internal containers if the input element is
412
407
implemented using a shadow tree
0 commit comments