Intent to Ship: CSS :open pseudo-class

306 views
Skip to first unread message

Joey Arhar

unread,
Dec 9, 2024, 5:14:21 PM12/9/24
to blink-dev

Contact emails

jar...@chromium.org

Explainer

None

Specification

https://drafts.csswg.org/selectors-4/#open-state

Summary

The :open pseudo-class matches <dialog> and <details> when they are in their open state, and matches <select> and <input> when they are in modes which have a picker and the picker is showing.



Blink component

Blink>Forms

TAG review


TAG review status

Resolution: satisfied

Risks



Interoperability and Compatibility

There is low interoperability risk due to positive signals and addressed feedback from other browser vendors.



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

WebKit: Support (https://github.com/WebKit/standards-positions/issues/413)

Web developers: No signals

Other signals:

Ergonomics

This feature will be used in the UA stylesheet for customizable <select>. The default usage of this API will not make it hard for Chrome to maintain good performance.



Activation

This feature can't be polyfiled for select and input elements because there is no other way to perfectly detect whether a picker is supported for these elements and that the picker is showing. For dialog and details elements, :open is redundant with [open] in CSS. This pseudo-class will be added to MDN: https://github.com/mdn/content/issues/37153



Security

None



WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

None



Debuggability

:open could be added to the list of "Force element state" pseudo-classes in the styles sidebar: https://issues.chromium.org/issues/383157184



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

Yes

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

Yes

https://wpt.fyi/results/css/selectors/open-pseudo.html



Flag name on about://flags

None

Finch feature name

CSSPseudoOpen

Requires code in //chrome?

False

Tracking bug

https://issues.chromium.org/issues/324293874

Measurement

https://chromium-review.googlesource.com/c/chromium/src/+/6081992
https://github.com/web-platform-dx/web-features/issues/2414

Estimated milestones

Shipping on desktop133
DevTrial on desktop123
Shipping on Android133
DevTrial on Android123
Shipping on WebView133


Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).

None

Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5085419215781888?gate=5094615646732288

Links to previous Intent discussions

Intent to Prototype: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAK6btw%2BkrwTF8u0pcOXgt_jJCa1ahK_ba7_YBus2AkeE_17_2w%40mail.gmail.com


This intent message was generated by Chrome Platform Status.

Domenic Denicola

unread,
Dec 9, 2024, 9:36:06 PM12/9/24
to blink-dev, Joey Arhar
LGTM1!

Mike Taylor

unread,
Dec 10, 2024, 8:00:54 AM12/10/24
to Domenic Denicola, blink-dev, Joey Arhar

LGTM2

--
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.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/ece62dac-22ce-4113-acfd-fa0ca2aa0c3dn%40chromium.org.

Daniel Bratell

unread,
Dec 11, 2024, 10:53:23 AM12/11/24
to Mike Taylor, Domenic Denicola, blink-dev, Joey Arhar
Reply all
Reply to author
Forward
0 new messages