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 🙏

© 2024 – Pkg Stats / Ryan Hefner

murto

v1.0.2

Published

Simple media queries for Sass

Downloads

3

Readme

Murto

Murto on NPM Murto Downloads on NPM

Simple media queries for Sass

Murto is heavily influenced by Rupture and Breakpoint Slicer.

Install

$ npm install murto

Import

@import '~murto/murto';

Settings (optional)

For a custom setup you need to have a scale name for each scale.

@import '~murto/murto';

/* These are the default values */
$murto: (
  scale: 0 576px 768px 992px 1200px 1800px,
  scale-names: 'xs' 's' 'm' 'l' 'xl' 'xxl'
);
scale:            0        576px       768px       992px       1200px      1800px
                  └────┬────┘ └────┬────┘ └────┬────┘ └────┬────┘ └────┬────┘ └────┬────
slice numbers:         1           2           3           4           5           6
scale-names:         'xs'         's'         'm'         'l'        'xl'        'xxl'

Mixins

above(measure)

Screen sizes above the measure will include the style block.

below(measure)

Screen sizes below the measure will include the style block.

between(measure, measure)

Screen sizes between the two measures will include the style block.

at(measure)

Screen sizes the measure will include the style block.

Measure

Measures work exactly like in Rupture. A measure can be a slice number, scale name (eg. 'lg') or a pixel value (100px). The slices in Murto start at 1 like list indexes in Sass.

Use

above, below and between take same type of arguments:

/* Slice number */
@include above(4) {
  .above-using-slice-number {
    background-color: #fff;
  }
}

// Compiles to
@media only screen and (min-width: 992px) {
  .above-using-slice-number {
    background-color: #fff;
  }
}
/* Scale name */
@include below(l) {
  .below-using-scale-name {
    background-color: #eee;
  }
}

// Compiles to
@media only screen and (max-width: 992px) {
  .below-using-scale-name {
    background-color: #eee;
  }
}
/* Pixels */
@include between(650px, 900px) {
  .between-using-pixels {
    background-color: #aaa;
  }
}

// Compiles to
@media only screen and (min-width: 650px) and (max-width: 900px) {
  .between-using-pixels {
    background-color: #aaa;
  }
}

at takes in just slice numbers and scale names

/* Slice number */
@include at(4) {
  .at-using-slice-number {
    background-color: #aaa;
  }
}

// Compiles to
@media only screen and (min-width: 992px) and (max-width: 1200px) {
  .at-using-slice-number {
    background-color: #aaa;
  }
}
/* Scale name */
@include at(xl) {
  .at-using-scale-name {
    background-color: #aaa;
  }
}

// Compiles to
@media only screen and (min-width: 1200px) and (max-width: 1800px) {
  .at-using-scale-name {
    background-color: #aaa;
  }
}

License

Released under the MIT license by Andreas Siivola.