
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
animate-css-grid
Advanced tools
This small script wraps a CSS grid (or really, any container element) and animates updates to its children. When the grid container, or one of its immediate children, is updated via the addition or removal of a class, the grid will smoothly transition its
This small script wraps a CSS grid (or really, any container element) and animates updates to its children. When the grid container, or one of its immediate children, is updated via the addition or removal of a class, the grid will smoothly transition its children to their new positions and sizes.
ES6 Modules:
yarn add animate-css-grid
import { wrapGrid } from animateCSSGrid
const grid = document.querySelector(".grid");
const { unwrapGrid } = wrapGrid(grid, {
stagger: true,
duration: 300
});
// later, to remove transitions
unwrapGrid()
Or from a script tag:
<script src="https://unpkg.com/animate-css-grid@latest"></script>
<script>
const grid = document.querySelector(".grid");
const { unwrapGrid } = animateCSSGrid.wrapGrid(grid, {
stagger: true,
duration: 300
});
</script>
The script registers a MutationObserver
that activates when the grid or one of its immediate children adds or loses a class.
It uses the FLIP animation technique to smoothly update the grid.
The updates to the grid will have to come from addition or removal of a class. Currently, inline style updates will not trigger transitions. If a grid item has children, they should be surrounded by a single container element.
OK:
<div class="some-grid-class-that-changes">
<div class="grid-item">
<div>
...child 1
...child 2
</div>
</div>
<div>
Not going to work:
<div style="[grid styles that change]">
<div class="grid-item">
...child 1
...child 2
</div>
<div>
FAQs
Buttery smooth, easy transitions for CSS grid
The npm package animate-css-grid receives a total of 5,380 weekly downloads. As such, animate-css-grid popularity was classified as popular.
We found that animate-css-grid demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.