Closed Bug 2016474 Opened 2 months ago Closed 2 months ago

[css-conditional-5] "query-less" container query support

Categories

(Core :: CSS Parsing and Computation, enhancement)

Firefox 149
enhancement

Tracking

()

RESOLVED FIXED
149 Branch
Tracking Status
firefox149 --- fixed

People

(Reporter: afrehner.work, Assigned: afrehner.work)

References

Details

(Keywords: dev-doc-complete)

Attachments

(1 file)

Steps to reproduce:

The spec supports the idea of "query-less" / "no query" container queries. To clarify:

https://drafts.csswg.org/css-conditional-5/#container-rule

outlines it as

<container-condition> = [ <container-name>? <container-query>? ]!
<container-name> = <custom-ident>
<container-query> = not <query-in-parens>
          | <query-in-parens> [ [ and <query-in-parens> ]* | [ or <query-in-parens> ]* ]

where <container-query> is now optional. This enables queries like

@container --name {}

to work, and the goal is to simply apply the styles if it is inside a container with that name --name.

WPTs exist here https://github.com/web-platform-tests/wpt/blob/master/css/css-conditional/container-queries/query-container-name.html

I'd like to implement this in Firefox so that it's all wrapped up https://wpt.fyi/results/css/css-conditional/container-queries/query-container-name.html?label=experimental&label=master&aligned

Actual results:

"query-less" container queries don't work

Expected results:

they should work.

The Bugbug bot thinks this bug should belong to the 'Core::CSS Parsing and Computation' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → CSS Parsing and Computation
Product: Firefox → Core
Assignee: nobody → afrehner.work
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Pushed by ealvarez@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/501819cc6fbb https://hg.mozilla.org/integration/autoland/rev/c8d7baa7ad1f Support name-only container queries, and update WPT results. r=layout-reviewers,firefox-style-system-reviewers,emilio
Pushed by amarc@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/c815c3a1f449 https://hg.mozilla.org/integration/autoland/rev/e538258ca7de Revert "Bug 2016474 - Support name-only container queries, and update WPT results. r=layout-reviewers,firefox-style-system-reviewers,emilio" for causing wpt failures @ at-container-serialization.html

Backed out for causing wpt failures

Flags: needinfo?(afrehner.work)

Ah, you need to annotate the extra passes. Please do that and we can get that re-landed. Thanks!

Updated! Thanks.

Flags: needinfo?(afrehner.work)
Pushed by ealvarez@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/e708df318201 https://hg.mozilla.org/integration/autoland/rev/44daa4dd59a9 Support name-only container queries, and update WPT results. r=layout-reviewers,firefox-style-system-reviewers,emilio
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 149 Branch
Keywords: dev-doc-needed
QA Whiteboard: [qa-triage-done-c150/b149]

FF149 MDN work for this can be tracked in https://github.com/mdn/content/issues/43212

Does this reflect a recent spec change?

I'm trying this on browserstack and the https://wpt.live/css/css-conditional/container-queries/query-container-name.html test fails on the most recent versions of all browsers they have. Looking at https://wpt.fyi/results/css/css-conditional/container-queries/query-container-name.html?label=master&label=experimental&aligned the versions are more recent, so it could be simply I don't have the right versions to test. Note, it does work locally on nightly.

The reason I ask is that I presume I will need to update the compatibility data, and it is useful to know when each browser updated.

Flags: needinfo?(afrehner.work)

Does this reflect a recent spec change?

Not very recent https://github.com/w3c/csswg-drafts/issues/9192#issuecomment-1789850349 , but recently implemented in browsers.

Webkit: in STP release 235 https://webkit.org/blog/17739/release-notes-for-safari-technology-preview-235/

I don't have insight into Firefox's nor Chrome's release timelines, but as you noted it's been implemented in both, so just waiting on releases.

Flags: needinfo?(afrehner.work)

Sorry, spec changed here specifically https://github.com/w3c/csswg-drafts/pull/11172

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: