Skip to content

Used size of tracks in a grid track with only auto keyword is incorrect #34925

@stevennovaryo

Description

@stevennovaryo

Track list that contains only auto(s) computed the sizes of the track incorrectly.

This also includes tests that uses keyword none in grid with grid items (and undefined auto-placement) and the one with incorrect value, because all of them should resolved to auto.

Result of grid-support-grid-template-columns-rows-001.html.
grid-support-grid-template-columns-rows-001.html

Result of grid-support-repeat-001.html.
grid-support-repeat-001.html


Given following demo (modified WPT tests):

<!doctype html><meta charset="utf-8">
<style>
    .grid {
      display: grid;
      width: 800px;
      height: 600px;
      font: 10px/1 Ahem;
      justify-content: start;
      align-content: start;
      grid-template-columns: none;
      grid-template-rows: none;
    }
</style>
<div id="grid" class="grid">
    <div id="item">GRID ITEM</div>
</div>
<pre><script>
    const div = document.getElementById("grid");
    document.write(getComputedStyle(div).gridTemplateColumns);
    document.write("; ");
    document.write(getComputedStyle(div).gridTemplateRows);
</script></pre>

Inspecting grid item yield the following.

Servo Firefox
image image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions