E479 [css-grid] More granular auto placement from grid container element · Issue #7399 · w3c/csswg-drafts · GitHub
[go: up one dir, main page]

Skip to content

[css-grid] More granular auto placement from grid container element #7399

@jacobp100

Description

@jacobp100

https://www.w3.org/TR/css-grid-1/#track-sizing-algorithm

In a many cases, you can rely on the default placement of the grid to do what you want. However, in the cases that it isn’t, you currently have to define grid-area (or other) on the children elements, which seems like a lot of extra ceremony.

Firstly, it would be nice if grid-auto-flow could be extended to allow named grid areas before row/column to populate these areas first.

grid: "a b c" auto / auto auto auto;
grid-auto-flow: b c a;

And this should also work on the grid property itself.

grid: "a b c" auto / auto auto auto b c a;

Presumably, if any children had explicit grid areas, they would be excluded from the auto placement. It’s probably an edge case anyway.

Secondly, it would be nice to add {row,column}-reverse to grid-auto-flow, to match flex-direction - where it will fill items in from the end rather than the start

grid-auto-flow: row-reverse;

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

      0