← Back to Learn
Career Development

CSS gap decorations: lines between grid items

By richi.codes · DEV Community · 10/31/2026

This note has an interactive demo. Try it in the original Drawing a line between grid cells has always been a hack: borders on half the items, :nth-child() rules to remove the extra ones, or a coloured background peeking through the gaps. Since Chrome and Edge 149 there's a real property for it:…

Read Full Article on DEV Community →

Full credit and content belongs to richi.codes and DEV Community. This page links to their original work — we never republish it.