
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
cssrecipes-grid
Advanced tools
BEMish grid component
$ npm install cssrecipes-grid
Default grid implementation is using inline-block+font-size 0 method:
@import "./node_modules/cssrecipes-grid/index.css";
If you want, an alternative grid based on flexbox is available in cssrecipes-grid/flex.
@import "./node_modules/cssrecipes-grid/flex.css";
Both rely on same classes, so generic documentation below should works both implementations"
Advice: you can use size utilities from cssrecipes-utils for convenience.
It includes .r-(all|min|max)* classes used in the examples below to define grid cells width.
$ npm install cssrecipes-utils cssrecipes-grid
@import "./node_modules/cssrecipes-custom-media-queries/index.css";
@import "./node_modules/cssrecipes-grid/index.css";
/* all, max (desktop first), min (mobile first) */
@import "./node_modules/cssrecipes-utils/index.css";
/*
Refer to cssrecipes-utils install doc to know more.
https://github.com/cssrecipes/utils#install
Or check examples below.
*/
First of all, you can override all these custom properties according to your needs (here are default values):
:root {
--r-Grid-baseFontSize: 1rem;
--r-Grid-gutter: 1rem; /* used for .r-Grid--withGutter */
}
@import "./node_modules/cssrecipes-custom-media-queries/index.css";
@import "./node_modules/cssrecipes-grid/index.css";
@import "./node_modules/cssrecipes-utils/lib/all.css";
@import "./node_modules/cssrecipes-utils/lib/min.css";
Grid size.r-Grid {
width: auto;
}
@media (--r-minM) {
.r-Grid {
width: 30rem;
}
}
@media (--r-minL) {
.r-Grid {
width: 50rem;
}
}
/** and the rest of it */
<div class="r-Grid">
<div class="r-Grid-cell r-all--1of2 r-minM--1of3 r-minL--1of4">
<!-- your content-->
</div>
<div class="r-Grid-cell r-all--1of2 r-minM--2of3 r-minL--3of4">
<!-- your content-->
</div>
</div>
@import "./node_modules/cssrecipes-custom-media-queries/index.css";
@import "./node_modules/cssrecipes-grid/index.css";
@import "./node_modules/cssrecipes-utils/lib/all.css";
@import "./node_modules/cssrecipes-utils/lib/max.css";
Grid size.r-Grid {
width: auto;
}
@media (--r-maxL) {
.r-Grid {
width: 50rem;
}
}
@media (--r-maxM) {
.r-Grid {
width: 30rem;
}
}
/** and the rest of it */
<div class="r-Grid">
<div class="r-Grid-cell r-all--1of4 r-maxL--1of3 r-maxM--1of2">
<!-- your content-->
</div>
<div class="r-Grid-cell r-all--3of4 r-maxL--2of3 r-maxM--1of2">
<!-- your content-->
</div>
</div>
@import "./node_modules/cssrecipes-grid/index.css";
@import "./node_modules/cssrecipes-utils/lib/all.css";
Grid size.r-Grid {
width: 50rem;
}
<div class="r-Grid">
<div class="r-Grid-cell r-all--1of4">
<!-- your content-->
</div>
<div class="r-Grid-cell r-all--3of4">
<!-- your content-->
</div>
</div>
To generate a build:
$ npm run build
To generate the testing build.
$ npm run build-test
Basic visual tests are in test/index.html.
Work on a branch, install dev-dependencies, respect coding style & run tests before submitting a bug fix or a feature.
$ git clone https://github.com/cssrecipes/grid.git
$ git checkout -b patch-1
$ npm install
$ npm test
This grid module has been inspired by SUIT CSS components-grid & SUIT CSS utilities: size
FAQs
BEMish grid component
We found that cssrecipes-grid demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.