Breakpoints

The $responsive-breakpoints map drives container max-widths, flex-grid responsive modifiers, and the three breakpoint mixins. All values are min-width; mobile is intentionally null (no media query).

Default map

NameMin widthTypical device
mobilenullPhones — default, no media query.
tablet768pxTablets in portrait, large phones in landscape.
desktop1024pxTablets in landscape, small laptops.
widescreen1280pxLaptops, standard desktop displays.
fullhd1536px1080p+ desktops, large external displays.

Mixins

MixinEmitsNotes
from($name)@media screen and (min-width: $size)Matches at $size and above.
until($name)@media screen and (max-width: $size - 1px)Strictly below the named breakpoint.

Usage

my-component.scss
@use '@adnap/krysalicss/helper/breakpoints';

.my-component {
  font-size: 1rem;

  @include breakpoints.from(tablet) {
    font-size: 1.125rem;
  }

  @include breakpoints.until(desktop) {
    padding: 0.5rem;
  }

  // "Only on tablets": compose from + until in a single rule.
  @include breakpoints.from(tablet) {
    @include breakpoints.until(desktop) {
      border: 1px solid red;
    }
  }
}

Custom breakpoints

Override the map at the framework entry. Keep mobile: null as the first entry: the flex grid uses it as the default-display breakpoint.

app.scss
@use '@adnap/krysalicss' with (
  $responsive-breakpoints: (
    mobile:     null,
    tablet:     640px,
    desktop:    960px,
    widescreen: 1200px,
    fullhd:     1440px,
  ),
);

Container queries

containerFrom and containerUntil mirror their media-query siblings but resolve against the nearest containment context. They share the $responsive-breakpoints map, so a tablet container query and a tablet media query cross the same width threshold (768px by default): only the reference frame differs.

MixinEmitsNotes
containerFrom($name)@container (min-width: $size)Caller declares container-type on the host.
containerUntil($name)@container (max-width: $size - 1px)Strictly below the named breakpoint.

Opting a component in

Modules with a $container-name variable expose a one-line opt-in: pass a non-null name when configuring the framework, and the component emits container-type: inline-size; container-name: <value>; on its host. Currently shipped on card and alert.

app.scss
@use '@adnap/krysalicss/helper/breakpoints';
@use '@adnap/krysalicss/module/card' with (
  $container-name: card,
);

// .card now exposes container-type: inline-size; container-name: card;
//: scope your card-aware rules with `containerFrom` / `containerUntil`:
.card .preview {
  display: grid;
  grid-template-columns: 1fr;

  @include breakpoints.containerFrom(tablet) {
    grid-template-columns: 1fr 1fr;
  }
}

Selection matrix

Reference frameMixinApplies when
Viewportfrom / untilLayout depends on viewport width.
ContainercontainerFrom / containerUntilLayout depends on the host element's own width, or the component is rendered in slots whose available width differs from the viewport (sidebar, modal, embedded).