Skip to content

Breakpoint

@unsass/breakpoint is a small, dependency-free Sass toolkit for managing responsive breakpoints. Define named breakpoints centrally and apply them with concise, composable mixins so media-query logic stays readable and consistent.

It supports named breakpoints and logical operators (up, down, only, between) so you can reuse breakpoint semantics across your stylesheets without duplicating raw pixel values.

Repository: github.com/unsass/breakpoint

Install

sh
npm install @unsass/breakpoint
sh
yarn add @unsass/breakpoint
sh
pnpm add @unsass/breakpoint

Requirement

Breakpoint relies on the modern Sass if() syntax, so a Dart Sass compiler >= 1.95.0 is required.

Basic usage

scss
@use "@unsass/breakpoint";

.foo {
    @include breakpoint.up("lg") {
        color: darkcyan;
    }
}
css
@media (min-width: 960px) {
    .foo {
        color: darkcyan;
    }
}

Next steps

Released under the MIT License.