Skip to main content
/
/
/
Responsive breakpoints

Responsive breakpoints

Bifrost uses some default viewport width values for responsive breakpoints.

Device pixels vs CSS px unit

Breakpoint names

Namesmallmediumlargexlxxl
Screen width600px960px1280px1600px1920px

CSS class names

CSS classnameDisplayed for screensDevices
.to-smallup to 600px wide
Mobile Portrait
.from-small600px and wider
Mobile Landscape
Tablet
Desktop
.to-mediumup to 960px wide
Mobile
Tablet Portrait
.from-medium960px and wider
Tablet Landscape
Desktop
.to-largeup to 1280px wide
Mobile
Tablet
Small Desktop
.from-large1280px and wider
Medium-XL Desktop
.to-xlup to 1600px wide
Mobile
Tablet
Small-Medium Desktop
.from-xl1600px and wider
Large-XL Desktop
(Fixed sidebar)
.to-xxlup to 1920px wide
Mobile
Tablet
Small-Large Desktop
.from-xxl1920px and wider
XL Desktop

Examples

Try resizing your window to test the demos below:

<div class="to-medium">displayed up to medium (0px-959px)</div> <div class="from-medium">displayed for medium and larger (960px +)</div>
<div class="to-medium">displayed up to medium (0px-959px)</div> <div class="from-medium">displayed for medium and larger (960px +)</div>
displayed up to medium (0px-959px)
displayed for medium and larger (960px +)

You can combine one .from-* class and a .to-* class to display only when between two breakpoints.

<div class="to-small">displayed up to small (0px-599px)</div> <div class="from-small to-medium"> displayed between small and medium (600px-959px) </div> <div class="from-medium">displayed for medium and larger (960px +)</div>
<div class="to-small">displayed up to small (0px-599px)</div> <div class="from-small to-medium"> displayed between small and medium (600px-959px) </div> <div class="from-medium">displayed for medium and larger (960px +)</div>
displayed up to small (0px-599px)
displayed between small and medium (600px-959px)
displayed for medium and larger (960px +)

Sandbox

Resize width of the preview window below to see different texts rendered.

<link rel="stylesheet" href="https://unpkg.com/@intility/bifrost-css@latest/dist/bifrost-all.css" /><link rel="stylesheet" href="styles.css" />

<div class="to-medium">displayed up to medium (0px-959px)</div>
<div class="from-medium">displayed for medium and larger (960px +)</div>

<hr />

<div class="to-small">displayed up to small (0px-599px)</div>
<div class="from-small to-medium">
  displayed between small and medium (600px-959px)
</div>
<div class="from-medium">displayed for medium and larger (960px +)</div>