Intent to Ship: CSS typed arithmetic

214 views
Skip to first unread message

Chromestatus

unread,
Jun 16, 2025, 8:13:19 AMJun 16
to blin...@chromium.org, sakh...@chromium.org

Contact emails

sakh...@chromium.org

Explainer

None

Specification

https://www.w3.org/TR/css-values-4/#calc-type-checking

Summary

Typed arithmetic allows to write expressions in CSS such a calc(10em / 1px) or calc(20% / 0.5em * 1px) which is useful for e.g. typography, as it allows to convert typed value into an untyped one and reuse it for number accepting properties or futher multiply the unitless value by some other type to e.g. cast from pixels to degrees.



Blink component

Blink>CSS

TAG review

None

TAG review status

Not applicable

Risks



Interoperability and Compatibility

None



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

WebKit: Shipped/Shipping

Web developers: Strongly positive Verbal confirmation from multiple developers that they really need it

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?

None



Debuggability

None



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/css/css-values/getComputedStyle-calc-mixed-units-003.html



Flag name on about://flags

CSSTypedArithmetic

Finch feature name

None

Non-finch justification

None

Rollout plan

Will ship enabled for all users

Requires code in //chrome?

False

Tracking bug

https://issues.chromium.org/issues/40768696

Estimated milestones

DevTrial on desktop 138
DevTrial on Android 138


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/4740780497043456?gate=5654265095520256

This intent message was generated by Chrome Platform Status.

Mike Taylor

unread,
Jun 17, 2025, 2:51:00 PMJun 17
to Daniil Sakhapov, blink-dev
Do you have plans to add more tests here? There's a number of types that aren't tested, and no coverage of infinities, NaN, or signed zeroes. 

Flag name on about://flags

CSSTypedArithmetic

Finch feature name

None

Non-finch justification

None

Rollout plan

Will ship enabled for all users

Requires code in //chrome?

False

Tracking bug

https://issues.chromium.org/issues/40768696

Estimated milestones

DevTrial on desktop 138
DevTrial on Android 138


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/4740780497043456?gate=5654265095520256

This intent message was generated by Chrome Platform Status.
--
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/68500a51.170a0220.aedbe.0618.GAE%40google.com.

Daniil Sakhapov

unread,
Jun 23, 2025, 8:18:00 AMJun 23
to blink-dev, Mike Taylor, blink-dev, Daniil Sakhapov
I've added a bunch of what you've requested in https://wpt.fyi/results/css/css-values/typed_arithmetic.html

I plan to add more tests for custom properties as well.

вторник, 17 июня 2025 г. в 20:51:00 UTC+2, Mike Taylor:
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

Mike Taylor

unread,
Jun 24, 2025, 8:33:08 AMJun 24
to Daniil Sakhapov, blink-dev

This is an awesome improvement to the testing story, thank you very much.

LGTM1

Vladimir Levin

unread,
Jun 24, 2025, 10:03:09 PMJun 24
to blink-dev, Mike Taylor, Daniil Sakhapov
LGTM2

Yoav Weiss (@Shopify)

unread,
Jun 25, 2025, 1:01:27 AMJun 25
to Vladimir Levin, blink-dev, Mike Taylor, Daniil Sakhapov
LGTM3

LGTM2

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

--
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/c86f5036-d6da-4c1e-8f67-e8f7253e342an%40chromium.org.
Reply all
Reply to author
Forward
0 new messages