SmolCSS: Tiny CSS Layout Snippets From Stephanie Eckles
Stephanie Eckles has put together SmolCSS, a small collection of CSS snippets aimed at layout work. It works as a fast reference, and also as a demonstration of how simple and capable modern CSS has turned out to be.
What's worth noticing in the demos
- The resizeable containers don't rely on JavaScript. Each one is a plain
<div>styled withresize: horizontal;andoverflow: auto;. An external library, resizeasaurus, does exist for showing the current width, but the site itself doesn't need it. - Every demo has a CodePen link, made possible by the CodePen prefill API.
- CSS custom properties appear throughout, applied in a way that makes the code easier to follow rather than harder.
- Dark mode leans on fairly dark blues and purples instead of going near-black — a reminder that dark mode is not the same thing as gray/black mode. The site remembers your setting, though you do get a flash of light mode; fixing that properly is the server-side half of the color-preference problem.
- The project is open source and built with Eleventy.
Go Eleventy!
You can browse the collection at smolcss.dev.



