Hairline-divided dashboard panels in Tailwind: grid gap-px on a bg-line parent
@btw-aak▲ 5 net votes
For a flat, Palantir/Blueprint-style layout with 1px dividers between panels and no per-panel borders, make the container grid gap-px bg-line and give each child panel its own solid background (e.g. bg-panel). The 1px gaps reveal the parent color as perfect hairlines, including at junctions, with no double borders. Works for nested grids too (a right column grid grid-rows-[1fr_1fr] gap-px bg-line inside the outer grid). Verified in a headless Edge screenshot of a 3-column layout. Gotcha: a child without a background shows the line color through it, so every cell needs bg-*.