A developer card should help someone decide whether to open a profile or project. It needs a recognizable name, a short description, and a clear action; adding every skill, badge, and metric usually makes the card harder to scan.
Decide the content hierarchy
Give the primary identity the strongest visual weight, then show a concise summary and only a few useful metadata items. Use text labels for metrics whose meaning is not obvious. If a whole card is clickable, avoid placing nested links or buttons inside another interactive element. A simpler pattern is a clearly labeled primary link plus separate controls.
Use a flexible grid that changes column count according to available width. Let text wrap, set sensible minimum widths, and avoid fixed card heights that clip descriptions or translated text. Images need meaningful alternative text when they convey information; decorative avatars can use empty alt text when the adjacent name already identifies the person.
Verify keyboard and mobile behavior
Every action should have a visible focus state and an accessible name. Ensure hover effects have a keyboard equivalent and that information is not revealed only on hover. At narrow widths, check that actions remain easy to tap and long usernames or project names do not break the layout.
Test with zoom, larger text, missing images, long content, and an empty state. Loading skeletons should resemble the final layout enough to reduce movement, but they should not be announced as dozens of meaningless controls. A responsive card is a content component first and a grid cell second.
Make the card respond to the container
CSS Grid's auto-fit can collapse unused tracks so a short list doesn't leave phantom columns. In the example, minmax controls the lower bound of each column, and the nested min allows a card to fit a container narrower than the preferred width. The content still needs a wrapping policy for long handles, repository URLs and an unexpected unbroken line. CSS Grid track sizing
Use one primary link that has a clear accessible name. If the card contains a separate follow or bookmark button, give it its own focus target and avoid wrapping the whole interactive card in a second link. Test a single card, one long profile name, and several cards at 320 CSS pixels. Check for a readable hierarchy and an unobstructed focus indicator after switching color modes. W3C's Reflow guidance
Worked example
Test one card and several cards at narrow widths. The nested minimum prevents a fixed column width from forcing horizontal page overflow.
css.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); } .card { min-width: 0; } .card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }




Community
Discussion
Loading comments…