division in calc() where an integer is required should now work
Reported by
ana.tudo...@gmail.com,
Aug 15
|
||||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
Steps to reproduce the problem:
1. Consider the following structure: a wrapper with four children:
```
<article>
<section>dummy</section>
<section>dummy</section>
<section>dummy</section>
<section>dummy</section>
</article>
```
2. Set `display: grid` on the wrapper and try using a `calc()` value inside the `repeat()` function in the value of the `grid` property. For example:
```
grid: repeat(calc(4/2), 1fr)/ repeat(2, 1fr);
/* or */
grid: repeat(calc(1*2), 1fr)/ repeat(2, 1fr)
```
Live test https://codepen.io/thebabydino/pen/VBOZXM
What is the expected behavior?
*Expected result*: a 2x2 grid in both cases. The second one (multiplication inside `calc()`) is pretty straightforward and works as expected in Chrome and Firefox, while the first one (division) should work, as per the Values 4 spec https://drafts.csswg.org/css-values-4/#calc-type-checking (no browser has yet caught up with this) - see also https://github.com/w3c/csswg-drafts/issues/2337
What went wrong?
*Actual result*: the first case (`calc()` with division inside `repeat()`) doesn't work.
Did this work before? No
Does this work in other browsers? No
Firefox (behaves the same as Chrome)
https://bugzilla.mozilla.org/show_bug.cgi?id=1440251
Edge (`calc()` doesn't work at all in places such as inside `repeat()`) https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/18675657/
Chrome version: 68.0.3440.106 Channel: stable
OS Version: 10.0
Flash Version:
,
Aug 16
Able to reproduce the issue on chrome version #60.0.3072.0, reported version #68.0.3440.106 and latest chrome#70.0.3523.0 using Windows 10, Ubuntu 17.10 and Mac 10.13.3, by following the steps in comment#0. The issue is observed from ld M-60 builds.This is a non-regression issue.Hence marking it as untriaged and requesting the dev team to look into the issue. Thanks.!
,
Aug 20
,
Sep 16
,
Sep 18
This is now fixed in Firefox and will likely be released with version 64: https://bugzilla.mozilla.org/show_bug.cgi?id=1440251 |
||||
►
Sign in to add a comment |
||||
Comment 1 by swarnasree.mukkala@chromium.org
, Aug 15