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

at-breakpoint

v0.0.4

Published

easy media queries for stylus

Downloads

35

Readme

#at-breakpoint easy media queries for stylus

Config

define your breakpoints in the breakpoints hash $BPS inside at-breakpoint.styl, breakpoints has a name and are defined by a string indicating the feature and a value establishing when the condition will trigger. There are two shortcuts for common media features like min and max width.

  $BPS = {
    'xs': 349px,                     // (min-width: 349px)
    'sm': 350px 779px,               // (min-width: 350px) and (max-width: 779px) 
    'md': in-resolution 2dppx 780px  // (in-resolution: 2dppx) and  (min-width: 780px)
  }

another way to add custom breakpoints us using the add-bp func.

add-bp('lg', 1024px)

if you want to print all your css classes with a suffix indicating the breakpoint name set $SUFFIX-MODE to true or to false otherwise.

$SUFFIX-MODE = true

Usage

at-breakpoint is very easy to use, just call the mixin as a block inside any css selector width the name of the breakpoint as paremeter.

.foo
  margin: 0
  padding: 0
  +at-breakpoint('sm')
    display: block

renders

.foo {
  margin: 0;
  padding: 0;
};

@media screen and (min-width: 350px) and (max-width: 779px) {
  .foo {
    display: block;
  }
};

create new breakpoints on the flow

you don't need to define a new breakpoint in the $bps hash, you can do it when you want to use that new breakpoint, at-breakpoint will add it for you to the $bps hash, the only thing you need is pass the name of the breakpoint and a features string.

.foo
  margin: 0
  padding: 0
  +at-breakpoint('xl', 1560px)
    display: table

print classes with breakpoint suffix

here is where at-breakpoint is slighty different for other media querie libraries, it allows you to output a css class with a suffix representing the breakpoint name of the media querie, just pass suffix:true to at-breakpoint.

.foo
  +at-breakpoint('xs', suffix:true)
    display: block

renders

@media screen and (min-width: 349px) {
  .foo-xs {
    display: block;
  };
};

additionaly you can print a class inside all breakpoints, if don't want to print a particular breakpoint add it to the excludes param as follows.

.foo
  +at-breakpoint('all', suffix:true, excludes: 'md')
    display: inline-block;
    vertical-align: top

renders

@media screen and (min-width: 349px) {
  .foo-xs {
    display: inline-block;
    vertical-align: top;
  };
};

@media screen and (min-width: 350px) and (max-width: 779px) {
  .foo-sm {
    display: inline-block;
    vertical-align: top;
  };
};

License

MIT