[Webkit-unassigned] [Bug 202259] New: [css-grid] The computed value of grid-template-{columns|rows} should not expand repeat()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 26 01:46:21 PDT 2019


https://bugs.webkit.org/show_bug.cgi?id=202259

            Bug ID: 202259
           Summary: [css-grid] The computed value of
                    grid-template-{columns|rows} should not expand
                    repeat()
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
               URL: https://bugs.chromium.org/p/chromium/issues/detail?id=
                    989004
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: CSS
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: obrufau at igalia.com
                CC: jfernandez at igalia.com, rego at igalia.com

The repeat() notation with an integral number of repetitions used to be expanded at specified-value time.
After bug 197840, this happens at computed-value time. But this is still wrong, it should be expanded at used-value time.

Usually this is not noticeable because getComputedStyle returns the used value for grid containers.
But it's observable if the property is used in an element which is not a grid container.
Also, preserving repeat() is necessary for proper interpolation (https://github.com/w3c/csswg-drafts/issues/3503)

What steps will reproduce the problem?
(1) Load https://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A%3Cdiv%20id%3D%22foo%22%20style%3D%22grid-template-rows%3A%20repeat(2%2C%20100px)%22%3E%3C%2Fdiv%3E%0A%3Cscript%3Ew(getComputedStyle(foo).gridTemplateRows)%3C%2Fscript%3E

    <div id="foo" style="grid-template-rows: repeat(2, 100px)"></div>
    <script>console.log(getComputedStyle(foo).gridTemplateRows)</script>

What is the expected result?
It logs "repeat(2, 100px)"

What happens instead?
It logs "100px 100px"

Blink is also wrong: https://bugs.chromium.org/p/chromium/issues/detail?id=989004
Firefox fixed it: https://bugzilla.mozilla.org/show_bug.cgi?id=1519958

-- 
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/20190926/a1077377/attachment-0001.html>


More information about the webkit-unassigned mailing list