Bug 184027 - Allow mathematical expressions in image sizes
Summary: Allow mathematical expressions in image sizes
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL: https://github.com/whatwg/html/pull/3084
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-26 16:24 PDT by John Musgrave
Modified: 2023-11-21 04:45 PST (History)
9 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Musgrave 2018-03-26 16:24:27 PDT
Currently `calc()` is supported as a CSS mathematical function. The CSS Values and Units Level 4 Specification describes a list of math functions [1] consisting of `calc()` in addition to `min()` and `max()`.  Suggest implementing recent specification changes.

The motivation for opening this bug is the reference to the aforementioned mathematical functions in the HTML Standard [2], which supports the appearance of mathematical functions in the `sizes` attribute on <img> elements.

[1]: https://drafts.csswg.org/css-values/#math-function
[2]: https://github.com/whatwg/html/pull/3084 & https://github.com/w3c/web-platform-tests/pull/10167
Comment 1 Dominic Farolino 2018-03-27 09:50:56 PDT
Note this issue might be a duplicate of one, though I'm not sure. Tab told me that the reason `min()` and `max()` made it into the spec as mathematical functions was because Apple said they were going to implement them, so there might already be an issue tracking their implementation. Either way... :)
Comment 2 Philip Jägenstedt 2023-04-18 01:08:34 PDT
https://wpt.fyi/results/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-width-1000px.html?label=experimental&label=master&aligned shows 4 Safari-only test failures due to min() and max() not being supported.