Skip to content

[css-grid] Interpolate repeat() #3503

Closed
@BorisChiou

Description

@BorisChiou

We have a discussion about interpolating track listings (#3201), but the current spec doesn't have clear definition of how to interpolate repeat(). (Or maybe I misread it. Please feel free to close it if there is a duplicated issue or they are well-defined already.)

Example 1:

repeat(2, 2fr 30px)
repeat(2, 3fr 40px)

They use the same repeat count, so doing interpolation between them is ok to me.

Example 2:

repeat(2, 2fr 30px)
repeat(4, 40px)

Their resolved/expanded track lists have the same length, so people may think they are animatable. However, we do interpolation by computed values, so it seems we shouldn't expand the list during interpolation, which means they are not animatable? I'm not sure which behavior is expected.

Example 3:

repeat(auto-fill, 10px)
repeat(auto-fill, 20px)

Even if the keyword is the same it can result in different number of tracks. For both auto-fit/fill, the number of columns isn't known until you do layout since it depends on the container size, item placement and other factors. Therefore, we fallback to discrete in this case. Right?

Thanks.
cc @MatsPalmgren @birtles

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions