I am using CSS grid layout to position various parts on a website. I use grid-column: x / x;
and grid-row x / x;
to set their position and size on
There are no CSS transitions for grid-column
or grid-row
properties. In order to have any,
grid-column: 2.5 / 9.5;
...would have to make sense from a rendering point of view.
Imagine you're the guy coding the browser. How would you render a grid-column:2.5 / 9.5;
?
Expecting CSS transitions to work here is like expecting them to work in CSS columns when content moves between columns.
Need animations with CSS Grid? JavaScript is your only friend.
Here's how I'd go about it:
grid-columns
property to the gridMaking this work cross-browser/cross-device might pose a few problems, but it's doable.
Note: You might want to consider adding a layer of wrappers between the contents of your grid elements and the grid elements, to help with two things: