Skip to content

[css-grid] making percentage grid-gaps zero for the purpose of intrinsic sizing doesn't make sense #472

Closed
@MatsPalmgren

Description

@MatsPalmgren

It was resolved in issue 345 that percentage grid-gaps are zero
for the purpose of intrinsic sizing:
#345

I think this needs to be revisited. It's counterintuitive that
percentage grid-gaps are zero while percentages in other properties
actually influence the intrinsic sizing. Making them zero doesn't
respect the author's intent.

It also contradicts how intrinsic sizing works in general:
#347

I think instead we should take either of these alternative options:

A. specify percentage grid-gap in some reasonable way for
the purpose of intrinsic sizing that harmonize with how
we want intrinsic sizing to work in general (issue 347)

B. move percentage grid-gaps to the next level of the CSS Grid spec

To help make a decision on this I have prototyped A in Gecko and
from what I can tell, it seems fairly easy to implement and spec
something that would work well. Here's an example:
https://people.mozilla.org/~mpalmgren/tests/grid/percent-intrinsic-sizing.html
(last two boxes are grids) and here's how it renders:
https://people.mozilla.org/~mpalmgren/tests/grid/percent-intrinsic-sizing.png

Thanks,
Mats

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions