Re: [csswg-drafts] [css-contain] Similar to window.matchMedia(), Container Queries should have a similar method (#6205)

Ah, thanks for clarifying that, everyone.

According to the css-conditional-5,  it describes about figuring out the container from the ancestor.
> For each element, the query container to be queried is selected from among the **element’s ancestor query containers that are established as a valid query container** for all the container features in the . If the contains unknown or unsupported container features, no query container will be selected for that . The filters the set of query containers considered to just those with a matching query container name.

I initially thought this api is likely `matchSelfAsContainer`. Maybe it is good to mention this on the spec. 

FWIW, If we need like  `matchSelfAsContainer` maybe, we can remove the word container from the API.

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


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

Received on Thursday, 12 March 2026 05:36:32 UTC