rachelandrew / cssgrid-ama

Ask me anything about CSS Grid Layout
328 stars 12 forks source link

Is it possible to transition or animate between Grid layouts? #74

Closed oliverturner closed 7 years ago

oliverturner commented 7 years ago

For example, can one smoothly animate between

.foo {
  grid-template-columns: 1fr 0fr;
}

and

.foo {
  grid-template-columns: 0fr 1fr;
}

The spec indicates that one should be able to, where the list is simple, but this example doesn't work as expected (by me at least!)

rachelandrew commented 7 years ago

The spec details that the track listing can be animated, how your example differs from what you expect would depend on what you expect.

oliverturner commented 7 years ago

Thanks for the response and sorry for being unclear: what I expect is for the the width of the grid grid columns to animate smoothly between values rather than snap between them (as it does presently).

rachelandrew commented 7 years ago

That seems like an implementation issue with browsers. For example see this issue raised here https://bugzilla.mozilla.org/show_bug.cgi?id=1348519