You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[css-conditional-5] CSSContainerRule.containerName/containerQuery should return a list #10845
Can you please tell me if there is any reason to withhold the appropriate changes on the CSSOM? Do you plan to rename the attributes? To remove them? To return a list of strings or a string of comma-separated values?
The current version of Chrome/FF (at least) only accept a single <container-condition>.
The CSS Working Group just discussed [css-conditional-5] `CSSContainerRule.containerName`/`containerQuery` should return a list, and agreed to the following:
RESOLVED: Editors will figure out how to fix the OM to match the new behavior, and bring it back to the group for review
The full IRC log of that discussion
<TabAtkins> astearns: miriam, this was months ago, but you put this on the agenda last year
<TabAtkins> miriam: okay, let's review...
<TabAtkins> miriam: we resolved earlier that a @container prelude could accept a list of conditions, but we didn't update the CSSOM to return a list
<TabAtkins> miriam: so the proposal is that CSSOM should reflect that list back to us
<TabAtkins> astearns: it's mentioned that none of the impls do it yet
<TabAtkins> miriam: at least, last yes, yes
<emilio> s/yes, yes/year, yes
<TabAtkins> astearns: so proposed resolution is to update CSSOM to match the resolution?
<kbabbitt> seems reasonable to me
<TabAtkins> miriam: yes
<TabAtkins> emilio: is the proposal to return a readonly sequence?
<TabAtkins> TabAtkins: i was thinking about that too. either it's readonly, or it could be settable but the list you get from the getter is "dead", doesn't reflect back into the object if you mutate
<TabAtkins> astearns: i think guillaume's PR doens't mention the read/write nature of the list
<TabAtkins> emilio: some back compat too. for the single-condition case, it might need to still return a string
<TabAtkins> astearns: do you think it's reasoanble to resolve on returning the list and find out if we have compat problems?
<emilio> TabAtkins: if today we allow a comma-separated list, how is it reflected? Just comma-separated list?
<emilio> ... if so it might be worth keeping the property alone
<emilio> ... and just have a function to get the listified version
<TabAtkins> miriam: maybe more complicated, containerName wouldn't make sense if it was returning the whole prelude
<TabAtkins> miriam: maybe nobody is usign the feature yet?
<TabAtkins> TabAtkins: propose we just reoslve to fix, and let editors figure out what it should look like
<TabAtkins> astearns: and who shoudl edit it?
<TabAtkins> TabAtkins: miriam or emilio?
<TabAtkins> emilio: this sounds reasonable. note that Firefox doesn't support multiple conditions yet, so it's not an issue for us.
<TabAtkins> emilio: maybe other browsers dont' eitehr, presumably they'd have run into this containerName issue too
<TabAtkins> astearns: so proposed resolution is we'll accommodate our intent in the CSSOM spec, but leave details to the editors to figure out what is possible given the constraints
<TabAtkins> miriam: can we get a little further? do we just have one property that returns a list, or a string property plus a list accessor?
<TabAtkins> astearns: i'd prefer only one, but i don't know if it's possible
<TabAtkins> emilio: i agree if we coudln't return a list...
<TabAtkins> emilio: but also the name is optional. if you have multiple container conditions, what are the names...?
<TabAtkins> emilio: if you have three conditions, only the first and third have a name...
<TabAtkins> TabAtkins: this is why i suggested leaving the details to the editors, i think they'd be pretty obvious once you start working it out
<TabAtkins> emilio: yeah, we can try to sort it out and come back with a more fleshed out proposal
<TabAtkins> miriam: sure
<TabAtkins> astearns: so we're resolved to fix this, and bring the solution back to the group
<TabAtkins> astearns: objections?
<TabAtkins> RESOLVED: Editors will figure out how to fix the OM to match the new behavior, and bring it back to the group for review
@emilio If that sounds good to you, I'd call it a design / proposal. At this point I still feel very unfamiliar with defining CSSOM, especially the grammars. I could open a PR with a prose description of the proposed behavior, but would need help with the details.
The CSS Working Group just discussed [css-conditional-5] `CSSContainerRule.containerName`/`containerQuery` should return a list, and agreed to the following:
RESOLVED: Adopt emilio's proposed design.
The full IRC log of that discussion
<fantasai> emilio: Resolved previously to [?], but didn't have a good way to present in OM
<fantasai> emilio: But this is in Interop 2026 so we need to know
<TabAtkins> +1 to emilio's design
<fantasai> emilio: I suggested that .containerQuery and .containerName return empty string if multiple values
<fantasai> emilio: and then return a disctionary separately
<kbabbitt> s/[?]/have multiple conditions in CSSContainerRule/
<fantasai> emilio: [missed]
<ChrisL> s/disc/dict/
<emilio> https://github.com//pull/13635
<Rossen> ack kizu
<Rossen> ack fantasai
<Rossen> fantasai: was wondering if name and qry and is comma separated?
<Rossen> emilio: name and qry and both are optional but at least one is needed
<fantasai> fantasai: name is nullable but query isn't?
<Rossen> https://github.com//issues/10845#issuecomment-4046359463
<TabAtkins> dictionary ContainerCondition {
<TabAtkins> CSSOMString? name;
<TabAtkins> CSSOMString query;
<TabAtkins> };
<TabAtkins>
<TabAtkins> readonly attribute FrozenArray<ContainerCondition> conditions;
<jfkthame> In the PR https://github.com//pull/13635/changes/a962648547f5d9407cea877fcb7fdcfb4b4471ed both strings are required
<fantasai> emilio: Spec PR gets it right
<fantasai> RESOLVED: Adopt emilio's proposed design.
@emilio, should I open a new issue for the following, and ask for some usage analytics?
We should try to remove containerName and containerQuery, since they don’t deal with multiple conditions correctly.
And given that the attributes return an empty string when there is more than one value, don't you think they should be defined as deprecated members in a separate partial interface?
@cdoublev sure, I added use counters in the Mozilla patch implementing this. But having an issue open and referencing it in the spec, or so, seems fine to me :)
Activity
Accept <container-condition># in @container
css-meeting-bot commentedon Mar 19, 2025
The CSS Working Group just discussed
[css-conditional-5] `CSSContainerRule.containerName`/`containerQuery` should return a list, and agreed to the following:RESOLVED: Editors will figure out how to fix the OM to match the new behavior, and bring it back to the group for reviewThe full IRC log of that discussion
<TabAtkins> astearns: miriam, this was months ago, but you put this on the agenda last year<TabAtkins> miriam: okay, let's review...
<TabAtkins> miriam: we resolved earlier that a @container prelude could accept a list of conditions, but we didn't update the CSSOM to return a list
<TabAtkins> miriam: so the proposal is that CSSOM should reflect that list back to us
<TabAtkins> astearns: it's mentioned that none of the impls do it yet
<TabAtkins> miriam: at least, last yes, yes
<emilio> s/yes, yes/year, yes
<TabAtkins> astearns: so proposed resolution is to update CSSOM to match the resolution?
<kbabbitt> seems reasonable to me
<TabAtkins> miriam: yes
<TabAtkins> emilio: is the proposal to return a readonly sequence?
<TabAtkins> TabAtkins: i was thinking about that too. either it's readonly, or it could be settable but the list you get from the getter is "dead", doesn't reflect back into the object if you mutate
<TabAtkins> astearns: i think guillaume's PR doens't mention the read/write nature of the list
<TabAtkins> emilio: some back compat too. for the single-condition case, it might need to still return a string
<TabAtkins> astearns: do you think it's reasoanble to resolve on returning the list and find out if we have compat problems?
<emilio> TabAtkins: if today we allow a comma-separated list, how is it reflected? Just comma-separated list?
<emilio> ... if so it might be worth keeping the property alone
<emilio> ... and just have a function to get the listified version
<TabAtkins> miriam: maybe more complicated, containerName wouldn't make sense if it was returning the whole prelude
<TabAtkins> miriam: maybe nobody is usign the feature yet?
<TabAtkins> TabAtkins: propose we just reoslve to fix, and let editors figure out what it should look like
<TabAtkins> astearns: and who shoudl edit it?
<TabAtkins> TabAtkins: miriam or emilio?
<TabAtkins> emilio: this sounds reasonable. note that Firefox doesn't support multiple conditions yet, so it's not an issue for us.
<TabAtkins> emilio: maybe other browsers dont' eitehr, presumably they'd have run into this containerName issue too
<TabAtkins> astearns: so proposed resolution is we'll accommodate our intent in the CSSOM spec, but leave details to the editors to figure out what is possible given the constraints
<TabAtkins> miriam: can we get a little further? do we just have one property that returns a list, or a string property plus a list accessor?
<TabAtkins> astearns: i'd prefer only one, but i don't know if it's possible
<TabAtkins> emilio: i agree if we coudln't return a list...
<TabAtkins> emilio: but also the name is optional. if you have multiple container conditions, what are the names...?
<TabAtkins> emilio: if you have three conditions, only the first and third have a name...
<TabAtkins> TabAtkins: this is why i suggested leaving the details to the editors, i think they'd be pretty obvious once you start working it out
<TabAtkins> emilio: yeah, we can try to sort it out and come back with a more fleshed out proposal
<TabAtkins> miriam: sure
<TabAtkins> astearns: so we're resolved to fix this, and bring the solution back to the group
<TabAtkins> astearns: objections?
<TabAtkins> RESOLVED: Editors will figure out how to fix the OM to match the new behavior, and bring it back to the group for review
mirisuzanne commentedon Mar 19, 2025
It looks like we currently return an empty string for
containerNamewhen no name is defined. I imagine we would do the same thing in a returned list.We also resolved to allow name-only queries, which means the
containerQuerycan also become empty – which needs to be updated as well. I expect that should also return an empty string when missing? And then would return an empty string in a list if there are multiple?It's not clear to me if
conditionTextshould remain a string of all conditions, or if it should also become a list of names/conditions?/cc @emilio
emilio commentedon Mar 19, 2025
Probably worth for
conditionTextto keep the whole thing for consistency with@mediaand so on.And I guess that mean that you could reconstruct all the conditions by "zipping" the names and queries.
mirisuzanne commentedon Mar 19, 2025
@emilio If that sounds good to you, I'd call it a design / proposal. At this point I still feel very unfamiliar with defining CSSOM, especially the grammars. I could open a PR with a prose description of the proposed behavior, but would need help with the details.
emilio commentedon Mar 19, 2025
Sure, would mostly be a matter of changing the WebIDL to return something like a
FrozenArray<CSSOMString>or so[css-conditional-5] Extend CSSContainerRule for multiple conditions.
7 remaining items
css-meeting-bot commentedon Mar 25, 2026
The CSS Working Group just discussed
[css-conditional-5] `CSSContainerRule.containerName`/`containerQuery` should return a list, and agreed to the following:RESOLVED: Adopt emilio's proposed design.The full IRC log of that discussion
<fantasai> emilio: Resolved previously to [?], but didn't have a good way to present in OM<fantasai> emilio: But this is in Interop 2026 so we need to know
<TabAtkins> +1 to emilio's design
<fantasai> emilio: I suggested that .containerQuery and .containerName return empty string if multiple values
<fantasai> emilio: and then return a disctionary separately
<kbabbitt> s/[?]/have multiple conditions in CSSContainerRule/
<fantasai> emilio: [missed]
<ChrisL> s/disc/dict/
<emilio> https://github.com//pull/13635
<Rossen> ack kizu
<Rossen> ack fantasai
<Rossen> fantasai: was wondering if name and qry and is comma separated?
<Rossen> emilio: name and qry and both are optional but at least one is needed
<fantasai> fantasai: name is nullable but query isn't?
<Rossen> https://github.com//issues/10845#issuecomment-4046359463
<TabAtkins> dictionary ContainerCondition {
<TabAtkins> CSSOMString? name;
<TabAtkins> CSSOMString query;
<TabAtkins> };
<TabAtkins>
<TabAtkins> readonly attribute FrozenArray<ContainerCondition> conditions;
<jfkthame> In the PR https://github.com//pull/13635/changes/a962648547f5d9407cea877fcb7fdcfb4b4471ed both strings are required
<fantasai> emilio: Spec PR gets it right
<fantasai> RESOLVED: Adopt emilio's proposed design.
[css-conditional-5] Extend CSSContainerRule for multiple conditions.
[css-conditional-5] Extend CSSContainerRule for multiple conditions.
[css-conditional-5] Extend CSSContainerRule for multiple conditions.
emilio commentedon Mar 27, 2026
Edits in ^, test-cases in https://wpt.fyi/results/css/css-conditional/container-queries/container-rule-cssom.html
cdoublev commentedon Mar 28, 2026
@emilio, should I open a new issue for the following, and ask for some usage analytics?
And given that the attributes return an empty string when there is more than one value, don't you think they should be defined as deprecated members in a separate partial interface?
emilio commentedon Mar 29, 2026
@cdoublev sure, I added use counters in the Mozilla patch implementing this. But having an issue open and referencing it in the spec, or so, seems fine to me :)