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 wideMobile Portrait
.from-small600px and widerMobile Landscape Tablet Desktop
.to-mediumup to 960px wideMobile Tablet Portrait
.from-medium960px and widerTablet Landscape Desktop
.to-largeup to 1280px wideMobile Tablet Small Desktop
.from-large1280px and widerMedium-XL Desktop
.to-xlup to 1600px wideMobile Tablet Small-Medium Desktop
.from-xl1600px and widerLarge-XL Desktop (Fixed sidebar)
.to-xxlup to 1920px wideMobile Tablet Small-Large Desktop
.from-xxl1920px and widerXL 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>
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>
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>