Skip to content

Navigation Menu

Sign in
Appearance settings
Sign up
Appearance settings

[css-grid] Track sizing algorithm and gutters #2201

Copy link
Copy link

Description

@mrego
Issue body actions

There's some text about this in gutters definition:

For the purpose of track sizing, each gutter is treated as an extra, empty track of the specified size.

And the track sizing algorithm has a note about gutters:

Note: Gutters are treated as empty fixed-size tracks for the purpose of the track sizing algorithm.

But they're not mentioned in the rest of the algorithm.

I believe the text in the spec is correct, but it has lead to confusion in 2 implementations (Blink/WebKit and Firefox), so probably it can be clarified to avoid this kind of mistakes.
The problem is detailed in the following Chromium bug, but basically if you have a content based grid container (e.g. a floated grid container for columns or one with height: auto for rows) both implementations were wrongly calculating the size of a flexible track.
The text on the spec says:

  1. Let leftover space be the space to fill minus the base sizes of the non-flexible grid tracks.

Implementations were subtracting non-flexible tracks, but forgetting about gutters (which should be considered non-flexible tracks too for this step.
@MatsPalmgren suggested I open this issue to try to clarify things if possible.

FWIW, Edge is right on this, and their behavior is the expected one.

Reactions are currently unavailable

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.