Re: [csswg-drafts] [css-conditional-5] Clarify behavior of named container queries in shadow trees (#12090)

For context: The initial spec made containers inside shadow DOM entirely hidden from light-style queries. The theory was that internal containers are an implementation detail, and shouldn't be exposed. That makes some sense, except that there's no way to select the _slot_ of an element, and query that as a container. So this often required extra elements (similar to grid cells, I suppose).

We reverted that because it seemed like container units should resolve on the flat tree, and that container units should resolve the same as queries. I also argued that containers are about getting information from context – much like inheritance, which works on the flat tree. Style queries make that association even more explicit, since the goal is often to query the value that will be inherited on a property.

In making that change, we didn't specify the question of container names. It does seem to me though that "Container queries and units use the flat tree" would _include container names_. That seems to me like the WPT is out of date.

-- 
GitHub Notification of comment by mirisuzanne
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12090#issuecomment-2810816192 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 16 April 2025 21:17:04 UTC