Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Intent to Ship: Boolean Context Style Container Queries

106 views
Skip to first unread message

Rune Lillesveen

unread,
May 3, 2023, 8:23:01 AM5/3/23
to blink-dev

Contact emails

fut...@chromium.org

Explainer

None

Specification

https://drafts.csswg.org/css-contain-3/#style-container

Summary

Support style() container queries without a declaration value, only a property name, as a way of matching non-initial values. Previously you would have to do: not style(--my-property: initial) Now you can do: style(--my-property) to match any non-initial value.



Blink component

Blink>CSS

TAG review

None

TAG review status

Not applicable

Risks


This is a minor change in the existing style() queries API. No new standards positions. Chrome shipped style() queries for custom properties in M111, but none of the other browsers have.

The effect on existing content is that boolean context style queries that currently parse as <general-enclosed> and evaluate to 'unknown' will start evaluating to true/false depending on computed value. It is so unlikely that existing content will be affected by this that it does not seem to be worth the effort to measure.

Interoperability and Compatibility



Gecko: No signal (https://github.com/mozilla/standards-positions/issues/686)

WebKit: No signal (https://github.com/WebKit/standards-positions/issues/57)

Web developers: No signals

Other signals:



Debuggability

Works

Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes

Is this feature fully tested by web-platform-tests?

Yes

Tests added for custom property queries under:

http://wpt.fyi/css/css-contain/container-queries/at-container-style-parsing.html
http://wpt.fyi/css/css-contain/container-queries/at-container-style-serialization.html
http://wpt.fyi/css/css-contain/container-queries/custom-property-style-queries.html


Flag name

#enable-experimental-web-platform-features

Requires code in //chrome?

False

Tracking bug

https://crbug.com/1442183

Estimated milestones

Shipping on desktop115
DevTrial on desktop114
Shipping on Android115
DevTrial on Android114
Shipping on WebView115


Anticipated spec changes

Resolved in [1], first PR merged [2], and a second spec-text-tweak PR to be merged [3]. 


[1] https://github.com/w3c/csswg-drafts/issues/8127#issuecomment-1479871971

[2] https://github.com/w3c/csswg-drafts/pull/8729

[3] https://github.com/w3c/csswg-drafts/pull/8756


Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/6332337266098176

Links to previous Intent discussions



This intent message was generated by Chrome Platform Status.

--
Rune Lillesveen

Manuel Rego Casasnovas

unread,
May 3, 2023, 5:35:31 PM5/3/23
to blin...@chromium.org
LGTM1

On 03/05/2023 14:22, Rune Lillesveen wrote:
>
> Contact emails
>
> fut...@chromium.org <mailto:fut...@chromium.org>
>
>
> Explainer
>
> None
>
>
> Specification
>
> https://drafts.csswg.org/css-contain-3/#style-container
> <https://drafts.csswg.org/css-contain-3/#style-container>
>
>
> Summary
>
> Support style() container queries without a declaration value, only a
> property name, as a way of matching non-initial values. Previously you
> would have to do: not style(--my-property: initial) Now you can do:
> style(--my-property) to match any non-initial value.
>
>
>
> Blink component
>
> Blink>CSS
> <https://bugs.chromium.org/p/chromium/issues/list?q=component:Blink%3ECSS>
>
>
> TAG review
>
> None
>
>
> TAG review status
>
> Not applicable
>
>
> Risks
>
>
> This is a minor change in the existing style() queries API. No new
> standards positions. Chrome shipped style() queries for custom
> properties in M111, but none of the other browsers have.
>
> The effect on existing content is that boolean context style queries
> that currently parse as <general-enclosed> and evaluate to 'unknown'
> will start evaluating to true/false depending on computed value. It is
> so unlikely that existing content will be affected by this that it does
> not seem to be worth the effort to measure.
>
>
> Interoperability and Compatibility
>
>
>
> /Gecko/: No signal
> (https://github.com/mozilla/standards-positions/issues/686
> <https://github.com/mozilla/standards-positions/issues/686>)
>
> /WebKit/: No signal
> (https://github.com/WebKit/standards-positions/issues/57
> <https://github.com/WebKit/standards-positions/issues/57>)
>
> /Web developers/: No signals
>
> /Other signals/:
>
>
>
>
> Debuggability
>
> Works
>
>
> Will this feature be supported on all six Blink platforms
> (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
>
> Yes
>
>
> Is this feature fully tested by web-platform-tests
> <https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_platform_tests.md>?
>
> Yes
>
> Tests added for custom property queries under:
>
> http://wpt.fyi/css/css-contain/container-queries/at-container-style-parsing.html <http://wpt.fyi/css/css-contain/container-queries/at-container-style-parsing.html>
> http://wpt.fyi/css/css-contain/container-queries/at-container-style-serialization.html <http://wpt.fyi/css/css-contain/container-queries/at-container-style-serialization.html>
> http://wpt.fyi/css/css-contain/container-queries/custom-property-style-queries.html <http://wpt.fyi/css/css-contain/container-queries/custom-property-style-queries.html>
>
>
>
> Flag name
>
> #enable-experimental-web-platform-features
>
>
> Requires code in //chrome?
>
> False
>
>
> Tracking bug
>
> https://crbug.com/1442183 <https://crbug.com/1442183>
>
>
> Estimated milestones
>
> Shipping on desktop 115
> DevTrial on desktop 114
>
> Shipping on Android 115
> DevTrial on Android 114
>
> Shipping on WebView 115
>
>
>
> Anticipated spec changes
>
> Resolved in [1], first PR merged [2], and a second spec-text-tweak PR to
> be merged [3]. 
>
>
> [1] https://github.com/w3c/csswg-drafts/issues/8127#issuecomment-1479871971 <https://github.com/w3c/csswg-drafts/issues/8127#issuecomment-1479871971>
>
> [2] https://github.com/w3c/csswg-drafts/pull/8729
> <https://github.com/w3c/csswg-drafts/pull/8729>
>
> [3] https://github.com/w3c/csswg-drafts/pull/8756
> <https://github.com/w3c/csswg-drafts/pull/8756>
>
>
> Link to entry on the Chrome Platform Status
>
> https://chromestatus.com/feature/6332337266098176
> <https://chromestatus.com/feature/6332337266098176>
>
>
> Links to previous Intent discussions
>
>
>
> This intent message was generated by Chrome Platform Status
> <https://chromestatus.com/>.
>
> --
> Rune Lillesveen
>
> --
> You received this message because you are subscribed to the Google
> Groups "blink-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to blink-dev+...@chromium.org
> <mailto:blink-dev+...@chromium.org>.
> To view this discussion on the web visit
> https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CACuPfeQszxjQghv1Gu7huZxNrWOCT0GS_9YEDmqejdont8%3D6_Q%40mail.gmail.com <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CACuPfeQszxjQghv1Gu7huZxNrWOCT0GS_9YEDmqejdont8%3D6_Q%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Philip Jägenstedt

unread,
May 9, 2023, 4:39:00 AM5/9/23
to Manuel Rego Casasnovas, blin...@chromium.org
LGTM2

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/45135ede-779a-9e4d-aa57-b10c50f97432%40igalia.com.

Mike Taylor

unread,
May 9, 2023, 1:50:55 PM5/9/23
to Philip Jägenstedt, Manuel Rego Casasnovas, blin...@chromium.org
Reply all
Reply to author
Forward
0 new messages