Open moises-marquez opened 2 years ago
The following code returns repeat(auto-fill, 300px) instead of 300px 300px as described in the CSS Grid spec (Note below example 19): https://www.w3.org/TR/css-grid-1/.
repeat(auto-fill, 300px)
300px 300px
const { JSDOM } = require("jsdom"); const dom = new JSDOM(` <!DOCTYPE html> <html> <head> <title></title> <style> #gridParentElement { width: 700px; display: grid; grid-template-columns: repeat(auto-fill, 300px); } </style> </head> <body> <div id="gridParentElement"> <div class="gridChild"></div> <div class="gridChild"></div> </div> </body> </html> `); const element = window.document.querySelector("#gridParentElement"); console.log(window.getComputedStyle(element).gridTemplateColumns);
In browser, the returned value should be 300px 300px. Link to reproducible case:
https://jsfiddle.net/y67dx3fm/
The spec for resolving repeat() as used for getComputedStyle is here: https://drafts.csswg.org/css-grid/#resolved-track-list
repeat()
Basic info:
Minimal reproduction case
The following code returns
repeat(auto-fill, 300px)
instead of300px 300px
as described in the CSS Grid spec (Note below example 19): https://www.w3.org/TR/css-grid-1/.How does similar code behave in browsers?
In browser, the returned value should be
300px 300px
. Link to reproducible case:https://jsfiddle.net/y67dx3fm/