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

lego-scss

v1.0.9

Published

Building blocks for your scss code - Basic functions to increase reusability of code

Readme

lego-scss

Building blocks for your scss code - Basic functions to increase reusability of code

Installation

  1. Run npm install lego-scss
  2. Include in your main scss file by @import "lego-scss";

Usage

- Common functions

  1. font-face: Initialize font-family, font-size, font-weight, font-style and color
@include font-face(font-size, color, font-weight, font-style, font-family)

All params are optional. If null is sent for any variable, it will fall back to "inherit"

  1. positioning - Align left, right, top, bottom or center
@include positioning(left/right/center, top/center/bottom)
  1. center-block - Align a block element at the center
@include center-block

Allow centering of a block element

  1. background-gradient - Apply a background gradient by specifying the start color, end color and orientation
@include background-gradient(start-color, end-color, horizontal/vertical)
  1. ellipsis - Truncate a text and show ellipsis
@include ellipsis(max-width)

- Responsiveness

  1. for-phone-only: < 600px
  2. for-tablet-portrait-up: >=600px
  3. for-tablet-landscape-down: <=767px
  4. for-tablet-landscape-up: >=767px
  5. for-desktop-down: <=991px
  6. for-desktop-up: >=992px
  7. for-big-desktop-down: <=1199px
  8. for-big-desktop-up: >=1200px
  9. width-less-than($size): <=$size
  10. width-more-than($size): >=$size
  11. width-in-between($minSize, $maxSize): <=$minSize and >=$maxSize

- Common Shapes

  1. Square
@include scss-square(size, color)
  1. Cirlces
@include scss-circle(size, color)
  1. Triangles
@include scss-triangle(size1, size2, direction, color)

The direction which the triangle is pointing can be - up/bottom/left/right/top-left/top-right/bottom-left/bottom-right

Examples

.foo {
  font-size: 2rem;
  @include for-tablet-landscape-down {
    font-size: 1.2rem;
  }
  @include for-mobile-only {
    font-size: 1rem
  }
}
.foo1 {
  @include width-more-than(1200px) {
    width: 80%;
  }
  @include width-in-between(601px, 1199px) {
    width: 90%;
  }
  @include width-less-than(600px) {
    width: 100%;
  }
}

will transform to

.foo {
  font-size: 2rem;
}
@media screen and (max-width: 767px) {
  .foo {
    font-size: 1.2rem;
  }
}
@media screen and (max-width: 600px) {
  .foo {
    font-size: 1rem;
  }
}
@media screen and (min-width: 1200px) {
  .foo1 {
    width: 80%;
  }
}
@media screen and (min-width: 601px) and (max-width: 1199px) {
  .foo1 {
    width: 90%;
  }
}
@media screen and (max-width: 600px) {
  .foo1 {
    width: 100%;
  }
}

Contributing

Pull requests and feature requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT