Bug 184027
| Summary: | Allow mathematical expressions in image sizes | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | John Musgrave <musgravejw> |
| Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | cdumez, cyb.ai.815, domfarolino, fotis.papadogeorgopoulos, koivisto, mike, philip, simon.fraser, zcorpan |
| Priority: | P2 | ||
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | https://github.com/whatwg/html/pull/3084 | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=259812 | ||
John Musgrave
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
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Dominic Farolino
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... :)
Philip Jägenstedt
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.