Bug 104821
Summary: | [CSS Grid Layout] element.style.webkitGridRows / webkitGridColumns doesn't return the right value | ||
---|---|---|---|
Product: | WebKit | Reporter: | Julien Chaffraix <jchaffraix> |
Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED WORKSFORME | ||
Severity: | Normal | CC: | donggwan.kim, menard, ojan, svillar, tabatkins, tony, xan.lopez |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All | ||
Bug Depends on: | |||
Bug Blocks: | 60731 |
Julien Chaffraix
If you try to get back the grid-rows / grid-columns from JS using Element.style, the values are not right. For example, with minmax:
element = document.createElement("div");
document.body.appendChild(element);
element.style.font = "10px Ahem";
element.style.webkitGridColumns = "minmax(22em, 8vh)";
element.style.webkitGridRows = "minmax(10vw, 5em)";
alert(element.style.webkitGridColumns); // "22em 8vh"
alert(element.style.webkitGridRows); // "10vw 5em"
It's unclear to me what we _should_ return though but those are definitely wrong. Also we have no coverage for getting back using Element.style which explains why we missed it. Whoever takes this bug should ensure a good coverage for most scenarios.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Sergio Villar Senin
This was already fixed and properly covered by multiple tests. Just to mention some
fast/css-grid-layout/grid-columns-rows-get-set.html
fast/css-grid-layout/grid-columns-rows-get-set-multiple.html
fast/css-grid-layout/named-grid-line-get-set.html
fast/css-grid-layout/grid-auto-columns-rows-get-set.html