animate-css-grid
animate-css-grid copied to clipboard
Is it possible to make a grid column slide off-screen?
In the app I'm building I have a CSS grid layout with a side panel and a main content container. I want to be able to toggle this panel (ie, hide it) by clicking on a handle. I'm trying this library in order to be able to animate the CSS grid changes. What I do, is adding a class that sets the first grid column to 0.
.layout-landscape {
display: grid;
grid-template-columns: minmax(400px, 21%) auto;
&.layout-landscape-collapsed {
grid-template-columns: 0 auto;
}
}
The desired effect is that the panel slides off-screen. The result of using this library is that it looks like it shrinks/expands (ie, panel content doesn't move to the left of the screen, it remains in place while the panel shrinks). I wanted to ask if it's possible to achieve the desired outcome of having the left panel slide off-screen.
Also, a possible bug, while the panel is shrinking, the content disappears. When the panel expands, the content is visible (and as I mentioned, remains fixed in place while the container expands).