npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@unsass/breakpoint

v2.7.0

Published

Composable Sass mixins and utilities for centralized, maintainable media-query breakpoints.

Readme

Breakpoint

Version Downloads License

Introduction

A small, dependency-free Sass toolkit for managing responsive breakpoints. Define named breakpoints centrally and apply them with concise, composable mixins and helpers so media-query logic stays readable and consistent.

Breakpoint

Installing

npm install @unsass/breakpoint

Usage

@use "@unsass/breakpoint";

.foo {
    @include breakpoint.up("lg") {
        color: darkcyan;
    }
}

Options

| Option | Description | |------------|---------------------------------------------------------------------------------------| | $screens | Map of breakpoint tokens, merged into the defaults. Default: the tokens listed below. | | $reset | Erase the default tokens to start fresh with your own. Default: false. |

@use "@unsass/breakpoint" with (
    $screens: (
        "lg": 1024px
    )
);

Tokens

| Key | Value | |-------|----------| | xs | 320px | | sm | 480px | | md | 768px | | lg | 960px | | xl | 1200px | | 2xl | 1400px |

A token passed through $screens is merged into this list, so you can add new sizes:

@use "@unsass/breakpoint" with (
    $screens: (
        "3xl": 1920px
    )
);

Use $reset: true to drop the defaults entirely and only keep your own tokens.

Top-level config override

A module can only be configured once with @use ... with. If the breakpoints are already configured at the top level (by another dependency, for example), use the config() mixin instead to override them at runtime.

See the official documentation about overriding configuration with mixins.

Mixins

up($token)

Applies a min-width media query from the given token.

@use "@unsass/breakpoint";

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

down($token)

Applies a max-width media query up to the given token.

@use "@unsass/breakpoint";

.foo {
    @include breakpoint.down("lg") {
        color: darkcyan;
    }
}
@media (max-width: 959.98px) {
    .foo {
        color: darkcyan;
    }
}

only($token)

Applies a media query bounded by the token and the next one. The last token behaves like up().

@use "@unsass/breakpoint";

.foo {
    @include breakpoint.only("lg") {
        color: darkcyan;
    }
}
@media (min-width: 960px) and (max-width: 1199.98px) {
    .foo {
        color: darkcyan;
    }
}

between($min, $max)

Applies a media query bounded by two tokens.

@use "@unsass/breakpoint";

.foo {
    @include breakpoint.between("md", "xl") {
        color: darkcyan;
    }
}
@media (min-width: 768px) and (max-width: 1199.98px) {
    .foo {
        color: darkcyan;
    }
}

config($screens, $reset)

Overrides the top-level @use ... with configuration at runtime. Extend the current tokens, or pass $reset: true to replace them entirely.

@use "@unsass/breakpoint";

// Extend the default list...
@include breakpoint.config((
    "3xl": 1980px
));

// ...or reset for a fresh start.
@include breakpoint.config((
    "tablet": 768px,
    "desktop": 960px
), true);

Functions

get-value($token)

Returns the value of a token from the configured tokens list.

@use "@unsass/breakpoint";

.foo {
    width: breakpoint.get-value("lg");
}
.foo {
    width: 960px;
}

get-next($token)

Returns the name of the token that immediately follows the given one. The last token returns null.

@use "@unsass/breakpoint";

$next: breakpoint.get-next("lg"); // "xl"
$last: breakpoint.get-next("2xl"); // null

get-prev($token)

Returns the name of the token that immediately precedes the given one. The first token returns null.

@use "@unsass/breakpoint";

$prev: breakpoint.get-prev("lg"); // "md"
$first: breakpoint.get-prev("xs"); // null

get-screens($exclude…)

Returns the map of configured tokens. Pass one or more token names to exclude them from the result.

@use "@unsass/breakpoint";

$all: breakpoint.get-screens();
// ("xs": 320px, "sm": 480px, "md": 768px, "lg": 960px, "xl": 1200px, "2xl": 1400px)

$subset: breakpoint.get-screens("xs", "2xl");
// ("sm": 480px, "md": 768px, "lg": 960px, "xl": 1200px)