@container (min-width: 200px...">

[css-contain-3] Container Queries and pseudo elements · Issue #6711 · w3c/csswg-drafts (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

@lilles

Description

@lilles

How do we find the container for pseudo elements?

@container (min-width: 200px) { #inner::before {} /* is #inner or #outer the container? / #inner::after {} / is #inner or #outer the container? / #inner::first-letter {} / is #inner or #outer the container? / #outer::first-letter {} / is #inner, #outer, or an ancestor of #outer the container? / #inner::first-line {} / is #inner or #outer the container? / #outer::first-line {} / is #inner, #outer, or an ancestor of #outer the container? */ }

More cases like ::marker and ::backdrop.

::slotted() and ::part() would match the same flat tree ancestor container as they would have when styled with normal selectors in their own tree scopes, right?