A Bootstrap 5 blog card grid with full-bleed cover images, colored category labels and an author row with a portrait, publish date and reading time. Use it for the "latest posts" section of a blog home page, a magazine landing page or the related articles block below a post.
How it works
The root section.bca-blog contains a header with a kicker, a serif heading and a "View all articles" pill link, followed by a Bootstrap row g-4. Each column (col-md-6 col-lg-4) holds one article.bca-card, so the grid shows one card on phones, two on tablets and three on desktops. Cards use height: 100% and a flex column, which keeps the author rows aligned when titles have different lengths.
.bca-cover crops the photo to the ratio in --bca-cover-ratio with object-fit: cover and places the .bca-label pill on top of it. The label, the title underline and the ring around .bca-avatar all read the --bca-tag custom property, which the modifier classes .bca-tag--work, .bca-tag--travel and .bca-tag--food set per category. The title link uses Bootstrap's stretched-link, so the whole card is clickable while the markup keeps a single link per post. On hover the card lifts, the cover zooms slightly and a colored underline grows under the title. The .bca-meta footer shows the author and a time element. No JavaScript is needed.
Customization
--bca-bg,--bca-inkand--bca-mutedon.bca-bloginstyle.css: change the section background, heading color and excerpt color.--bca-cover-ratioon.bca-blog: use4 / 3or1 / 1for taller covers.--bca-radiuson.bca-blog: round or square the card corners.--bca-serifon.bca-blog: swap Georgia for your own display font in the heading and titles.- Add a modifier such as
.bca-tag--design { --bca-tag: #7c3aed; }and put it on a card to give a new category its own label and avatar ring color. col-lg-4on the columns: usecol-lg-3and add a fourth card for a denser grid.
Use cases
- Company blogs: cover photos, category labels and author avatars make posts easy to scan
- News and magazine sites: colored category labels help readers sort articles by topic in a card grid
- Content hubs: dates and read time help readers choose what to open
- Resource pages: fully clickable cards link each post and show its author and date
Accessibility
The section is labelled by its heading and every post is an article with an h3 title. The cover photos have descriptive alt text, while author portraits use alt="" because the author name follows as text. Only the title is a link; stretched-link extends its click area without creating duplicate links for screen readers. Because the link covers the card, the focus ring is drawn on the card through :focus-within, in the category color. The separator dot in the meta line is aria-hidden. Hover lift, image zoom and the underline animation are turned off with prefers-reduced-motion: reduce.
Usage notes
Requires Bootstrap 5; Bootstrap Icons is only used for the arrow in the "View all articles" link. The cover images and author portraits come from Unsplash; replace them with your own photos. Keep covers at a similar ratio so the grid stays even.