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
Description
Container queries enable the querying of a parent element for responsive design information instead of relying on the global viewport (as with media queries). These rely on the containment spec, and enables component-level logic for styling based on inline and block size.
Rationale
This is consistently one of the top rated feature requests by developers and unlocks more customizable component-level responsive design. [Post][Developer Response to WIP]
We plan to move the tests in wpt_internal over to wpt/css/css-contain/ over the next couple of weeks, but not necessarily file by file. We probably want to restructure based on common testing patterns and organize per spec section to make it easier to check coverage.
@una says that w3c/csswg-drafts#6426 is probably the last issue remaining and that publishing might be a few weeks out.
As noted, it appears is somewhat surprising there's still no FPWD. It's surprising that we've not reached a point where the spec can be published at all, as after all it's a first draft, and not a last draft.
Per #39 (comment) we're not going to include Container Queries in Interop 2022, but there's still an open question about the contain property, which is Containment Level 1+2. @annevk@jgraham will you comment on this issue with your findings, or how would you like to handle this?
A question that came up when discussing this is whether it's just the contain property or also other things specified in CSS Containment 1/2? With that answered we can probably give a more detailed answer next week.
Note that tests where all browsers already pass are not mentioned here at all.
Note also that I can't investigate each test deeply to see what the true failure reason is for a given browser. (Random example: maybe contain-size-grid-005.html fails because of grid interop issues, and not contain interop issues).
The following are not included since they use one of the following:
contain:inline-size, which exists only for container query purposes.
contain:style, which Mozilla presumably won't prioritize.
contain:strict/content, which both imply contain:style.
A proposed list of tests has been labeled with interop-2022-contain. It would be great if someone from each browser engine team can look over this list and comment if there are any issues.
Activity
foolip commentedon Nov 12, 2021
There are a lot of tests in https://wpt.fyi/results/css/css-contain, but they seem to be about the
containproperty rather than the@containerrule.It loos like we have a bunch of tests in Chromium that haven't been upstreamed to WPT yet:
https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/web_tests/wpt_internal/css/css-conditional/container-queries/
Are those tests sufficient?
lilles commentedon Nov 26, 2021
We plan to move the tests in wpt_internal over to wpt/css/css-contain/ over the next couple of weeks, but not necessarily file by file. We probably want to restructure based on common testing patterns and organize per spec section to make it easier to check coverage.
lilles commentedon Nov 26, 2021
We would like to land this first as the basic syntax changed from our current impl: https://chromium-review.googlesource.com/c/chromium/src/+/3301380
foolip commentedon Nov 29, 2021
I've added the
requires:spec-maturitylabel because https://www.w3.org/TR/css-contain-3/ is 404, which I presume means that this hasn't been published as FPWD yet.foolip commentedon Dec 2, 2021
@una says that w3c/csswg-drafts#6426 is probably the last issue remaining and that publishing might be a few weeks out.
gsnedders commentedon Dec 2, 2021
As noted, it appears is somewhat surprising there's still no FPWD. It's surprising that we've not reached a point where the spec can be published at all, as after all it's a first draft, and not a last draft.
The CSS WG resolved in June:
See also question on IRC today.
foolip commentedon Dec 8, 2021
The CSS WG has just resolved to publish a FPWD for Contain 3: w3c/csswg-drafts#6426 (comment)
andruud commentedon Dec 8, 2021
Note: We recently WPT-ified and upstreamed our tests for container queries + inline-size containment:
/css/css-contain/container-queries/*
/css/css-contain/contain-inline-size-*
[-]Container Queries[/-][+]Containment / Container Queries[/+]foolip commentedon Dec 10, 2021
Per #39 (comment) we're not going to include Container Queries in Interop 2022, but there's still an open question about the
containproperty, which is Containment Level 1+2. @annevk @jgraham will you comment on this issue with your findings, or how would you like to handle this?annevk commentedon Dec 10, 2021
A question that came up when discussing this is whether it's just the
containproperty or also other things specified in CSS Containment 1/2? With that answered we can probably give a more detailed answer next week.foolip commentedon Dec 15, 2021
@annevk sorry I didn't see the notification for this. It's just the
containproperty, notcontent-visibility. In terms of tests, roughly https://wpt.fyi/results/css/css-contain excluding https://wpt.fyi/results/css/css-contain/container-queries and https://wpt.fyi/results/css/css-contain/content-visibility.If there are types of containment that not everyone wants to include in Interop 2022, we could discuss a subset.
1 remaining item
foolip commentedon Dec 16, 2021
Thanks @annevk. In chat we also realized that
contain:strictshould be excluded, leaving is with layout, size, and paint containment.@andruud helped me identify the set of tests for that, which I've labeled as
interop-2022-contain. It should show up soon as little label icons next to the test names here:https://wpt.fyi/results/css/css-contain?label=master&label=experimental&product=chrome&product=firefox&product=safari&aligned
More useful info from Anders:
foolip commentedon Dec 16, 2021
@andruud kindly took another pass over those.
I'll label those additional tests too.
Label additional contain tests that are already passing
annevk commentedon Dec 16, 2021
Thanks @foolip and thanks @andruud for spotting that!
gsnedders commentedon Dec 16, 2021
@annevk said '(strict tests where the style aspect doesn't matter are still fair game.)' on Matrix
foolip commentedon Dec 16, 2021
We'll include the size, layout and paint containment subset of this proposal.
gsnedders commentedon Dec 16, 2021
i.e.,
none | content | [ size || layout || paint ]is the subset of the values forcontainbeing accepted[-]Containment / Container Queries[/-][+]Containment[/+]Label additional contain tests that are already passing
foolip commentedon Jan 10, 2022
A proposed list of tests has been labeled with
interop-2022-contain. It would be great if someone from each browser engine team can look over this list and comment if there are any issues.