Skip to content

SCSS: Breakpoints

Breakpoints define a shared responsive scale without imposing visual layouts.

TokenValue
$breakpoint-xs320px
$breakpoint-sm425px
$breakpoint-md768px
$breakpoint-lg1024px
$breakpoint-xl1280px
scss
@use '@micazoyolli/foundation/scss' as foundation;

.gallery {
  grid-template-columns: repeat(3, 1fr);

  @include foundation.down(foundation.$breakpoint-md) {
    grid-template-columns: 1fr;
  }
}

Use them for shared responsive decisions. Do not use them when a component should respond to its container instead.

Visual result

xs 320sm 425md 768lg 1024xl 1280

The demo shows the relative scale. It does not mean every project must use every breakpoint.

Compatibility

Sass in Vite, Next.js, Vue, Angular and Astro projects.