What Is Bootstrap 5 Breakpoints?
Bootstrap 5 breakpoints are predefined CSS media query thresholds — xs (0px), sm (576px), md (768px), lg (992px), xl (1200px), and xxl (1400px) — that define the viewport widths at which a layout adapts to different screen sizes. They are implemented using CSS custom properties and Sass variables, allowing developers to build responsive grids, utilities, and components that reflow predictably across devices. Unlike Bootstrap 4, version 5 drops jQuery dependency and refines the breakpoint system with the addition of the xxl tier and improved Sass API.
What Is Bootstrap 5 Breakpoints?
Bootstrap 5 breakpoints are predefined CSS media query thresholds — xs (0px), sm (576px), md (768px), lg (992px), xl (1200px), and xxl (1400px) — that define the viewport widths at which a layout adapts to different screen sizes. They are implemented using CSS custom properties and Sass variables, allowing developers to build responsive grids, utilities, and components that reflow predictably across devices. Unlike Bootstrap 4, version 5 drops jQuery dependency and refines the breakpoint system with the addition of the xxl tier and improved Sass API.
How Bootstrap 5 Breakpoints Works
Bootstrap 5 breakpoints are built on CSS media queries using the `min-width` approach, meaning styles cascade upward — a class applied at `md` also applies to `lg`, `xl`, and `xxl` unless overridden. This mobile-first methodology means the base styles target the smallest viewport (xs, starting at 0px), and each subsequent breakpoint layer adds or overrides styles as the viewport widens. The six tiers are defined in Bootstrap's `_variables.scss` as a Sass map: `$grid-breakpoints: (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px)`, making them customizable at the Sass compilation level before any CSS is generated. Breakpoints power Bootstrap's 12-column grid system through responsive infix notation. A class like `col-md-6` means the column occupies 6 of 12 columns from 768px and wider, while stacking to full width below that threshold. The infix (`md`, `lg`, etc.) maps directly to the corresponding `min-width` media query generated in the compiled CSS. This pattern extends beyond the grid to utilities like `d-none d-md-block` (hidden on mobile, visible from md up) and `text-sm-start` (left-align from sm breakpoint up). Internally, Bootstrap 5 uses Sass mixins — `breakpoint-up()`, `breakpoint-down()`, `breakpoint-between()`, and `breakpoint-only()` — to generate scoped media query blocks. For example, `@include media-breakpoint-up(lg)` compiles to `@media (min-width: 992px) { ... }`. The `breakpoint-down()` mixin uses `max-width` calculations by subtracting 0.02px from the next breakpoint's value to avoid overlap, following the CSS specification's recommendation for avoiding integer rounding issues at exact thresholds. Bootstrap 5 also integrates breakpoints into its JavaScript components and data attributes, though the responsive behavior is CSS-driven. The `navbar` component, for instance, uses `navbar-expand-{breakpoint}` to control at which viewport width the hamburger menu collapses into a horizontal nav. Container widths are also breakpoint-responsive: `.container` has fixed max-widths per tier (e.g., 960px at lg, 1140px at xl), while `.container-fluid` always spans 100% of the viewport width.
Best Practices for Bootstrap 5 Breakpoints
Always design mobile-first: start with base styles targeting xs and layer upward using `col-sm-*`, `col-md-*`, etc., rather than overriding large-screen styles downward — this produces leaner CSS and aligns with Bootstrap's internal compilation logic. Avoid mixing `breakpoint-down()` with `breakpoint-up()` patterns on the same element without clear intent, as this creates brittle media query overlaps that are hard to debug; prefer `breakpoint-only()` for styles that should apply exclusively within one tier. When customizing breakpoints via Sass, always update `$grid-breakpoints` and `$container-max-widths` together — mismatched values between these two maps cause containers to overflow or fail to center correctly. Use Bootstrap's responsive display utilities (`d-none`, `d-{bp}-block`) sparingly and only for true layout changes, not content hiding for SEO purposes — hidden content is still parsed by search engines but contributes to page weight without rendering benefit. For complex layouts, test at the exact pixel thresholds (576px, 768px, 992px, 1200px, 1400px) in DevTools' responsive mode, not just at common device sizes, since many real devices fall between standard presets.
Bootstrap 5 Breakpoints & Canvas Builder
Canvas Builder is built on Bootstrap 5 as its core CSS framework, meaning every layout it generates inherits Bootstrap's full breakpoint system — the six-tier grid (xs through xxl) is available in all output HTML without any additional configuration. When Canvas Builder generates a multi-column layout, it applies correct responsive class combinations (e.g., `col-12 col-md-6 col-xl-4`) so sections reflow properly across phones, tablets, and desktops without requiring the developer to write a single media query manually. The clean, standards-compliant HTML output Canvas Builder produces is fully compatible with Bootstrap Sass customization workflows, meaning you can override breakpoint values at the Sass level and recompile against Canvas Builder's output to produce a fully custom responsive system.
Try Canvas Builder →