GODRICH
#css-animation#button#loader#transition#scroll#dashboard#ui#design-trends

02Member grid — computing the last row's count to avoid an orphan card

Dividing the member count by the column count and reading the remainder computes how many end up in the last row, and only when that remainder is one or two does a --cols variable shrink that row's column count to center it; a ResizeObserver reruns the same math whenever a width change alters the column count itself.

Best forFull company roster, department member cards

CSS GridResizeObserverCSS custom properties
Member grid — computing the last row's count to avoid an orphan card
Open in a new tab

02 Member grid — computing the last row's count to avoid an orphan card — Measured area 29.079% · moving frames 8/23Original by GODRICH · SCSS and React ship in the zip · 9 Team Page Design Patterns (Copy-Paste)

The post this demo lives in

9 Team Page Design Patterns (Copy-Paste) - preview of all 9 demos9 Team Page Design Patterns (Copy-Paste)Nine team-page sections that compute their layout: columns balance by headcount, bios get read-more only past overflow, See all demos in this post

If you like this effect - similar demos