Animating CSS Grid
css-irl.info
css-irl.info
To address some of the comments about use cases: we have a grid of items we want to filter based on a user’s search query. It is easy to animate the items disappearing but not easy to shift the remaining items into their new positions because the grid properties don’t let you animate that way. If I have an item in row 2 column 3 there’s not an easy way to transition it to row 1 column 1 at present. If you change the row and column values in this way it will jump from column to column row to row, not move from 125px,80px to 0px,0px along a sloped path.
>> To address some of the comments about use cases: we have a grid of items we want to filter based on a user’s search query.
Isn't that what XSLT is good for to some extent? I guess nobody seems to use it but it can do things like treat selected items differently. Using animation features to hide rows in a grid feels like the wrong solution to me.
This is assuming you're actually dealing with a grid, and not some kind of floating pop-over panel eg a drop-down menu panel
How would you go about it? Maybe more importantly, how would you want to go about it?
For anything where you only need to control one dimension, flexbox is way easier and cleaner. Plus you can animate it!
Or just nice transitions when changing responsive views.