Skip to content

feat(cards): add a split layout - #276

Merged
markdumay merged 1 commit into
mainfrom
feat/cards-split-layout
Nov 2, 2026
Merged

markdumay merged 1 commit into
mainfrom
feat/cards-split-layout

Conversation

@markdumay

Copy link
Copy Markdown
Contributor

Summary

Adds layout: split to the cards block, which places the heading and links beside the cards instead of above them. It's useful for breaking up a page where several card rows follow each other.

  • From the lg breakpoint up, the heading and links take the left column and the cards take the right, split 50/50.
  • Below lg, the columns stack. The switch sits one breakpoint after the section width applies, so tablets keep the full width.
  • The split layout uses a smaller gutter (g-3). With cols: 1 and padding: 0, the cards read as a compact stack.
  • Blocks that don't set layout render as before.
- _bookshop_name: cards
  layout: split
  orientation: horizontal
  cols: 1
  padding: 0
  width: 10
  justify: center

The column ratio is fixed at 50/50. A configurable ratio can follow if a site needs one.

Testing

  • pnpm test builds the example site, and /components/cards/ now includes a split example.
  • The layout was explored on amfelt.com at desktop width, and checked at 820px and 390px with a 5/7 split: columns stack with no horizontal overflow. The final 50/50 ratio was checked at desktop width only.
  • No dark mode check was done. The layout adds no colors of its own.

🤖 Generated with Claude Code

Add a layout argument to the cards block. With layout set to split,
the heading and links sit beside the cards in two equal columns from
the lg breakpoint up, and stack below it. The block otherwise renders
as before.

The split layout uses a smaller gutter, so a single column of cards
reads as a compact stack.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@markdumay
markdumay merged commit e1244e2 into main Nov 2, 2026
5 checks passed
@markdumay
markdumay deleted the feat/cards-split-layout branch November 2, 2026 09:33
@markdumay

Copy link
Copy Markdown
Contributor Author

🎉 This PR is included in version 2.15.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant