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/breakpointsh
yarn add @unsass/breakpointsh
pnpm add @unsass/breakpointRequirement
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
- Configuration — customize or extend the breakpoint tokens.
- Functions and Mixins — the full API.
- Best Practices — mobile-first patterns and pitfalls.