Intent to Ship: named-feature() function for CSS @supports

23 views
Skip to first unread message

David Baron

unread,
2:01 PM (4 hours ago) 2:01 PM
to blink-dev
Contact emails
dba...@chromium.org

Explainer
https://github.com/w3c/csswg-drafts/blob/main/css-conditional-5/named-feature-explainer.md

Specification
https://drafts.csswg.org/css-conditional-5/#typedef-supports-named-feature-fn

Summary
The named-feature() function allows CSS @supports rules to query for a small set of specific named features that are not possible to test for using other @supports mechanisms but which are considered highly valuable to test for.

Blink component
Blink>CSS

Web Feature ID
Missing feature

Motivation
Sometimes we add new features to CSS where two things are simultaneously true: first, that CSS authors see high value in writing conditional styles for whether the feature is supported using @supports, and second, that the existing mechanisms in @supports don't provide a useful way to test for the feature.

This provides a way for us to give names to a small number of high-value features so that CSS authors can test for them in their style sheets.

We will ship initially with a single supported feature, identified by the anchor-position-follows-transforms keyword.

Initial public proposal
https://github.com/w3c/csswg-drafts/issues/3559#issuecomment-1868169502

TAG review
https://github.com/w3ctag/design-reviews/issues/1186

TAG review status
Issues addressed

Goals for experimentation
None

Risks


Interoperability and Compatibility
No information provided

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

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

Web developers: Positive (https://github.com/w3c/csswg-drafts/issues/3559) In various forums developers have asked questions about how to feature-detect things in CSS that we couldn't previously offer feature detection for. While some developers have asked for more powerful feature detection (that would be difficult for us to provide), this provides a simple solution for something developers have been asking for.

Other signals:

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?

No information provided


Debuggability
No information provided

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/css-conditional/at-supports-named-feature-001.html

Flag name on about://flags
No information provided

Finch feature name
CSSSupportsNamedFeatureFunction

Rollout plan
Will ship enabled for all users

Requires code in //chrome?
False

Tracking bug
https://issues.chromium.org/353715317

Availability expectation
Hoping that other engines will implement soon after launch in Chrome, although we haven't seen concrete signs of this yet.

Adoption expectation
I'd expect that once this is available it will be quickly become a best practice for feature detection of future new features that are given feature names as they roll out to developers.

Adoption plan
Adoption is really tied to the adoption of the other features that this is used to feature-detect.

Estimated milestones
Shipping on desktop150
DevTrial on desktop146
Shipping on Android150
DevTrial on Android146
Shipping on WebView150


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).

No information provided

Link to entry on the Chrome Platform Status
https://chromestatus.com/feature/5153932394102784?gate=4891886507261952

Links to previous Intent discussions
Intent to Prototype: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAG0MU3ih_y_Z1CVCKHCzK1Sq08HxAc3cvqwpPZrc6%3DB%3DPacz6A%40mail.gmail.com


This intent message was generated by Chrome Platform Status.
Reply all
Reply to author
Forward
0 new messages