[Webkit-unassigned] [Bug 255280] CSS bug: Support division/multiplication of mixed units
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Apr 12 04:49:44 PDT 2023
https://bugs.webkit.org/show_bug.cgi?id=255280
--- Comment #3 from Brandon McConnell <brandon at dreamthinkbuild.com> ---
Here is a minimal example of this bug:
https://codepen.io/brandonmcconnell/pen/OJByEBO/126b86e86107bda0133813141da9108e
The screen appears red, because of this rule:
```css
main {
width: 100vw;
height: 100vh;
background-color: red;
}
```
However, it should appear blue, due to this style:
```css
main > div {
width: calc(100% / 20px * 20px);
height: calc(100% / 20px * 20px);
background-color: blue;
}
```
The `/ 20px * 20px` should naturally cancel each other out, making those values `100%` once again. This is per the current `css-values-4` spec.
This can also be used, for example, to determine how many times a static number like `25px` fits into a dynamic size like `100vh` and then store that number for use anywhere the number type is accepted.
This will be especially useful once `round()` is implemented (via [#1407473](https://bugs.chromium.org/p/chromium/issues/detail?id=1407473)).
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230412/baef0c62/attachment.htm>
More information about the webkit-unassigned
mailing list