Skip to content

[css-conditional-5] Add matchContainer() and ContainerQueryList API text#13551

Open
meyerweb wants to merge 11 commits intow3c:mainfrom
meyerweb:master
Open

[css-conditional-5] Add matchContainer() and ContainerQueryList API text#13551
meyerweb wants to merge 11 commits intow3c:mainfrom
meyerweb:master

Conversation

@meyerweb
Copy link
Member

As per #6205.

@meyerweb meyerweb changed the title [css-spec-shortname-1] Add matchContainer() and ContainerQueryList API text [css-conditional-5] Add matchContainer() and ContainerQueryList API text Feb 23, 2026

<ol>

<li>If <var>target</var>'s <a>matches state</a> has changed since the last time these steps were run,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about describe or mention what the target is? I initially thought it was element itself. But the recent issues talks and container query behavior is finding eligible ancestor of the element.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

@DevSDK DevSDK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I focused on referring to the element's target container which is already defined as a "query container" for @container.


A {{ContainerQueryList}} object has an associated
<dfn for=ContainerQueryList>container</dfn> which is the
<a lt='serialize a container query list'>serialized</a>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we missed the serialization rule here.

We may need to create/adopt the existing rule? https://drafts.csswg.org/cssom-1/#serialize-a-media-query-list


<li>If <var>target</var>'s <a>matches state</a> has changed since the last time these steps were run,
<a>fire an event</a> named <a event>change</a> at <var>target</var>
using {{ContainerQueryListEvent}},
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose we missed definition ContainerQueryListEvent idl here?

FYR: https://drafts.csswg.org/cssom-view/#mediaquerylistevent

and also We may need to ContainerQueryListEventInit that correspond with MediaQueryListEventInit


<ol>

<li>If <var>target</var>'s <a>matches state</a> has changed since the last time these steps were run,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

meyerweb and others added 5 commits March 20, 2026 09:46
Co-authored-by: Seokho Song <0xdevssh@gmail.com>
Co-authored-by: Seokho Song <0xdevssh@gmail.com>
Co-authored-by: Seokho Song <0xdevssh@gmail.com>
Co-authored-by: Seokho Song <0xdevssh@gmail.com>
Co-authored-by: Seokho Song <0xdevssh@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants