Breakpoints

Five named breakpoints define the responsive grid. All breakpoints use min-width media queries for a mobile-first approach.

Breakpoint values

The breakpoint map is defined in settings/_breakpoints.scss and can be overridden at import time.

NameValue
sm576px
md768px
lg1024px
xl1280px
2xl1536px

Responsive class convention

Responsive modifiers use a @{bp} suffix appended to the class name. The suffixed class applies from the named breakpoint upward (mobile-first). This convention works with both BEM block modifiers and utility classes.

index.htmlhtml
<!-- Grid: 1 column by default, 3 columns from md up -->
<div class="ln-grid ln-grid--cols-1 ln-grid--cols-3@md">
  <div class="border p-2 text-center">One</div>
  <div class="border p-2 text-center">Two</div>
  <div class="border p-2 text-center">Three</div>
</div>
One
Two
Three

Responsive utilities

Utility classes that have responsive: true in the utility map also accept the @{bp} suffix. Common responsive utilities include display, text alignment, margin, padding, flex direction, and width.

index.htmlhtml
<!-- Hidden by default, visible as block from md up -->
<div class="d-none d-block@md border p-2 mb-3">Visible from md up</div>

<!-- Left-aligned by default, centred from lg up -->
<p class="text-start text-center@lg border p-2">Centred from lg up</p>
Visible from md up

Centred from lg up

Overriding breakpoints

Override the default map when importing the library. Custom breakpoint names become available as suffixes throughout the system.

styles.scssscss
@use 'ln/scss' with (
  $breakpoints: (
    sm:  480px,
    md:  768px,
    lg:  992px,
    xl:  1200px,
    '2xl': 1600px,
  )
);

Reference

BreakpointValueSuffix
sm576px@sm
md768px@md
lg1024px@lg
xl1280px@xl
2xl1536px@2xl

Responsive suffixes are available on BEM block modifiers (grid, cluster) and utility classes with responsive: true (display, spacing, text-align, flex, width, float, font).