You have a Bootstrap 5 page loaded from a CDN, no Sass build, and a design with one big feature card next to smaller ones in different sizes. Someone tells you that needs a Sass build or a different framework. I think that’s wrong.
Yes, you can build a Bootstrap 5 bento grid without Sass: use the compiled CDN stylesheet with .row and .col-* classes when cards only differ in width, and add a small plain CSS Grid block when a feature card has to span two rows.
This post is for front-end developers and freelancers working in an existing Bootstrap 5.3 page, or prototyping from Figma. It gives you two copy-paste layouts, the breakpoints and gaps to lock in, and a way to decide between them.
Key Takeaways
- If cards only need different widths per row, the stock 12-column Flexbox grid is enough: 8/4 on one row, 6/6 on the next.
- If one card must sit across two shared rows, use
.d-gridplus a small custom CSS block. Bootstrap’s own.gridand.g-col-*classes are not in the CDN build. - Use
.g-*on a.rowand.gap-*on the native grid. They are not interchangeable. - For these layouts, use three states: one column below 768px, two columns from 768px, and the asymmetric layout from 992px.
- For a Figma handoff at a 992px viewport with a 16px root, the two layouts need different guides: a 960px frame with 12 columns, or 4 columns on a 936px inner frame.
Can you build a bento grid with the Bootstrap 5 CDN?
You can: the compiled Bootstrap 5.3.9 stylesheet already contains the row, column, card, display and gap classes a bento layout needs, so no $enable-cssgrid recompile is involved.
Pin the stylesheet the way the official quick start does. 5.3.9 is the latest v5 release in the release archive.
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bento card layout</title>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.9/dist/css/bootstrap.min.css"
integrity="sha384-yEPZ7jP9S0QKiUQ0m3jjsO4ProIW7wvR9gXkI7JOGa2XVsw53Yke2bsdkBbjmmiX"
crossorigin="anonymous">
</head>That head works for both examples below, and neither uses JavaScript. The only real decision is which of the two layouts you need.
| Your design | Pick | What you write |
|---|---|---|
| Cards differ in width, every row is its own height | Flexbox grid | Classes only |
| One card is taller and shares two rows with its neighbours | Native CSS Grid | Classes plus a small CSS block |
| You need automatic masonry with unknown card heights | Neither | Bootstrap documents Masonry as a separate plugin |
A bento is a planned arrangement of cards, so if cards need to pack automatically around varying heights you have a different problem.
Which breakpoints and gaps should you use?
Lock three states: a single column below 768px, two columns from 768px, and the asymmetric layout from 992px. Use a 1rem gap on small screens and 1.5rem from 768px.
The Bootstrap 5 grid system has six tiers: below 576px, then sm at 576px, md at 768px, lg at 992px, xl at 1200px and xxl at 1400px. These are minimum widths, so col-lg-8 applies from 992px upward. The card arrangements change at two of those breakpoints. They are my choices for this layout, not rules: with more cards or longer copy you may want to move the asymmetric split to xl.
| Viewport | Flexbox layout | Native Grid layout | Gap |
|---|---|---|---|
| Below 768px | One card per line | One column | 1rem (.g-3 or .gap-3) |
| 768px to below 992px | Two equal columns | Two equal columns | 1.5rem (.g-md-4 or .gap-md-4) |
| 992px and up | 8/4 row, then 6/6 row | Four tracks, feature spans 2 by 2 | 1.5rem |
Pick the gap class by the container: .g-* on a row, .gap-* on a .d-grid element.
The spacing scale runs 0, 0.25rem, 0.5rem, 1rem, 1.5rem, 3rem for sizes 0 to 5, so 3 is 1rem and 4 is 1.5rem. Below 768px both layouts are one column, but oversized images and content that cannot wrap can still force sideways scroll.
How do you build an asymmetric card grid with Bootstrap classes only?
Put cards in .col-* wrappers inside one .row: col-lg-8 next to col-lg-4, then two col-md-6 cards, with .h-100 on each card so heights match along a line.
This is the 12 column grid bootstrap behaviour you already know. Eight plus four fills a line of twelve, and any column that would overflow wraps to the next line.
<main class="container py-4">
<h1>Project highlights</h1>
<div class="row g-3 g-md-4">
<div class="col-12 col-md-6 col-lg-8">
<article class="card h-100">
<div class="card-body"><h2 class="card-title">Featured project</h2></div>
</article>
</div>
<div class="col-12 col-md-6 col-lg-4">
<article class="card h-100">
<div class="card-body"><h2 class="card-title">Process</h2></div>
</article>
</div>
<div class="col-12 col-md-6">
<article class="card h-100">
<div class="card-body"><h2 class="card-title">Results</h2></div>
</article>
</div>
<div class="col-12 col-md-6">
<article class="card h-100">
<div class="card-body"><h2 class="card-title">Next steps</h2></div>
</article>
</div>
</div>
</main>col-12 is the base, col-md-6 applies at 768px, and col-lg-8 or col-lg-4 overrides it at 992px. The two bottom cards keep col-md-6 all the way up, which gives the 6/6 row.
.g-3 sets the horizontal and vertical gutter to 1rem and .g-md-4 raises both to 1.5rem at 768px. Those classes go on the row. In v5 the row’s children carry half the horizontal gutter as padding on each side and the vertical gutter as top margin. The row offsets the side padding and the first line’s top margin with negative margins, so a .gap-* utility on the same row can add extra space and push percentage columns onto a new line. The 5.3.9 grid source shows the mechanism.
A worked example at a 992px viewport, assuming a 16px root: the container is 960px wide with 12px of padding per side, so the row is 960px after its negative margins. col-lg-8 is about 640px and col-lg-4 is about 320px. Allow for 12px of padding per side, and the cards measure about 616px and 296px. The 24px between them is the two paddings together. That is arithmetic from the defaults, so check it in your browser’s inspector.
The limit: no card here spans two rows. In Flexbox you can nest a stack of two cards in a column beside a tall card, but then the two sides stop sharing row lines. If the design needs shared lines, go to the next section.
How do you span two rows without Sass?
Add .d-grid and a gap utility to the container, then write a plain CSS block that defines four columns and gives the feature card grid-row: span 2 and grid-column: span 2 from 992px.
Bootstrap’s own CSS Grid option (.grid and .g-col-*) has been opt-in since 5.1.0 and the stock build leaves it off. Turning it on means setting $enable-cssgrid and recompiling, which is what you are avoiding. .d-grid only sets display: grid, so the tracks are yours to define. It does not give you 12 tracks by itself.
<main class="container py-4">
<h1>Project highlights</h1>
<div class="bento d-grid gap-3 gap-md-4">
<article class="card bento-feature">
<div class="card-body"><h2 class="card-title">Featured project</h2></div>
</article>
<article class="card bento-wide">
<div class="card-body"><h2 class="card-title">Process</h2></div>
</article>
<article class="card">
<div class="card-body"><h2 class="card-title">Results</h2></div>
</article>
<article class="card">
<div class="card-body"><h2 class="card-title">Next steps</h2></div>
</article>
</div>
</main>Put this CSS in a stylesheet linked after Bootstrap, or in a <style> element after the Bootstrap link:
.bento {
grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 768px) {
.bento {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
@media (min-width: 992px) {
.bento {
grid-template-columns: repeat(4, minmax(0, 1fr));
grid-auto-rows: minmax(8rem, auto);
}
.bento-feature {
grid-row: span 2;
grid-column: span 2;
}
.bento-wide {
grid-column: span 2;
}
}
At 992px there are four equal tracks. The feature card takes the first two columns of both rows. The wide card fills the two remaining cells of the top row, and the two small cards drop into the second row beside the feature, because default auto-placement places these cards in document order. The minmax(0, 1fr) tracks stop long unbroken strings from stretching a column, though text can still overflow if it cannot wrap, and minmax(8rem, auto) sets a minimum row height that still grows with content. See the MDN grid basics for how span consumes tracks.
Leave .h-100 off here. These grid items stretch by default, so each card already fills its grid area. Our guide to using CSS Grid alongside the Bootstrap 5 Flexbox grid covers more ways to combine the two.
Can you put the bento grid inside a Bootstrap row?
Yes: wrap the grid in a .col-12 child of the page’s existing .row in a Bootstrap container, and let the inner element with .d-grid control the spacing between cards.
<div class="row">
<div class="col-12">
<div class="bento d-grid gap-3 gap-md-4">
<!-- Insert the four card articles here. -->
</div>
</div>
</div>The outer column supplies its normal side padding, so the bento lines up with other sections that use the same container and gutters. Inside it the .gap-* classes own every space between cards.
How do you reproduce the layout in Figma?
Use a Stretch Columns layout guide on a frame sized to the Bootstrap container. For a Bootstrap grid in Figma at 992px, that is a 960px frame, 12 columns, 12px side margins and a 24px gutter.
Figma’s layout guides take a count, a margin and a gutter. The container maximum at the lg tier is 960px and the row’s gutter is 1.5rem, so each column keeps 12px of padding either side. These pixel values assume a 16px root size because rem follows the root font size. If your root differs, 1.5rem is not 24px.
The native Grid sample needs different settings, which is the useful part of a Bootstrap grid for Figma handoff. The container still measures 960px, but its own 12px padding comes off each side, which leaves a 936px inner content frame. Put four Stretch columns on it with a 24px gap and zero extra margin. Each column comes out at 216px, because 936 minus three gaps of 24, divided by four, is 216.
Give the developer a short note per frame: frame width, container width, margin, how many columns each card spans, and the gap at each of the three states. Figma’s layout guides are visual aids, so the note is how the numbers reach the code.
What should you check before shipping?
Test the widths on either side of each breakpoint, then try real content and the keyboard.
- Open the page at 767px and confirm one stack, then 768px and 991px for two columns, then 992px for the asymmetric layout.
- Replace the placeholder headings with real copy, including your longest title and a long URL, and look for sideways overflow on a narrow screen.
- Check that Flexbox cards on each line have equal height, and that the native grid rows are at least 8rem tall from 992px.
- Keep the DOM order the same as the reading order: feature, process, results, next steps.
- Add your real links or buttons, then press Tab through them.
CSS Grid placement can change where things appear. The W3C Grid spec notes that default tab and speech order still follow the document. If you reorder cards visually, focus can jump around the page, which can fail WCAG 2.2 success criterion 2.4.3 if navigation order affects meaning or operability and the focus order fails to preserve it. The samples above keep source order and need no reordering.
Two mistakes to avoid: copying a .card-deck or .no-gutters snippet from an old Bootstrap 4 tutorial (the v5 migration guide records the first as removed and the second as replaced by .g-0), and adding grid-auto-flow: dense to fill a hole. Dense packing can move later cards into earlier gaps, so the visual order can differ from the focus order.
For other card arrangements to put in the same grid, see 9 Bootstrap 5 Card Layouts for Portfolios and Blogs. The Bootstrap 5 utility class reference lists the display and gap classes, and the responsive design playbook covers the rest of the page.
One note if you work in Canvas. Canvas 8.1 is on Bootstrap 6, so translate the affected Bootstrap 5 classes above because the responsive notation and the spacing scale changed. The Canvas Bootstrap 6 template page has the mapping cheat sheet.
Your first step
Copy the head and the Flexbox sample into an HTML file with <!doctype html> and <html lang="en">, open it, and drag the window across 767px, 768px and 992px. Then swap in your real card content. You will have a working asymmetric grid, and you will know from that test whether your design needs the two-row feature card and the CSS block that goes with it.
Frequently Asked Questions
Can I build a Bootstrap 5 bento grid without Sass?
Yes. The CDN stylesheet gives you rows, columns, cards, .d-grid and gap utilities. Use classes alone for uneven widths, and add a small plain CSS block when a card has to span two rows.
Can I make a bento grid using only Bootstrap utilities?
Partly. Stock classes cover stacked cards and uneven widths through Flexbox. A shared grid where one card spans two rows needs native CSS Grid track and span rules, which Bootstrap’s compiled CSS does not include.
Why do the .grid and .g-col-* classes not work from the CDN?
Bootstrap’s alternate CSS Grid system is opt-in and the stock 5.3 build leaves it disabled. You enable $enable-cssgrid in Sass and recompile, which defeats a no-build setup.
How does the 12 column grid in Bootstrap decide when cards wrap?
Each numbered .col-* class takes a share of twelve units. When the shares on a line add up to more than twelve, the extra column wraps to the next line. 8 plus 4 fills a line, and so does 6 plus 6.
Can I use a CSS Grid bento inside a Bootstrap row?
Yes. Put the grid in a .col-12 inside the outer .row, then give the inner element .d-grid and gap classes. It controls its own tracks and card placement.
How do I set up a Bootstrap grid in Figma?
Use a Stretch Columns layout guide. For the Flexbox sample at 992px with a 16px root font size, use a 960px frame, 12 columns, 12px margins and a 24px gutter. For the native Grid sample, use four columns on a 936px frame with a 24px gap.
Which breakpoints should a bento grid use in Bootstrap 5?
These examples use three states: one column below 768px, two columns from 768px, and the asymmetric layout from 992px. Check them against your real content, since these are choices and not requirements.
Skip the setup and build it free
Spin up a complete Bootstrap 5 site, blog included, with Canvas Builder. No coding, no cost.
Rohit S
Rohit S builds Canvas at SemiColonWeb, the team behind the Canvas HTML Template, CanvasWP and CanvasBuilder AI.
More from the Canvas Blog