New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 874332 link

Starred by 3 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

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:
 
Labels: Needs-Triage-M68
Cc: swarnasree.mukkala@chromium.org
Labels: Triaged-ET Target-70 M-70 FoundIn-70
Status: Untriaged (was: Unconfirmed)
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.!
Cc: futhark@chromium.org
Status: Available (was: Untriaged)

Comment 4 by y...@yoav.ws, Sep 16

Cc: y...@yoav.ws
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