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

ez-scss

v1.0.9

Published

🎨 Helpful Sass/Scss mixins to make styling you web apps easier.

Downloads

37

Readme

ez-scss

This is a library of mixin functions for Scss/Sass to help minimise code and increase the readability of stylesheets. Created by Daniel Scott, founder of Life of Dan.

If you have any requests for features please either open an issue in the git repo or email me

Getting Started

All you have to do is import the scss mixins you need file:

@import 'ez-scss/responsive'; // for responsive sizing
@import 'ez-scss/mixins'; // toolkit to shorten css props

// rest of your code...

Then include the mixins where ever you like!

@import 'ez-scss/responsive';

// BEFORE
@media (max-width: 425px) {
  font-size: 1rem;
  padding: 8px 16px;
  width: fit-content;
}

@media (max-width: 320px) {
  padding: 4px 8px;
}

// AFTER ~ improved readability
@include mobile-l {
  font-size: 1rem;
  padding: 4px 16px;
  width: fit-content;
}

@include mobile-s {
  padding: 4px 8px;
}
@import 'ez-scss/mixins';

// BEFORE
div {
  display: flex;
  justify-content: center;
  align-items: center;
  align-content: center;
  flex-direction: column;
  flex-wrap: wrap;
  width: 100vw;
  height: 100vh;
}

// AFTER
div {
  @include setFlex(center, center, center, column, wrap);
  @include setSize(100vw, 100vh);
}

Helpful Notes

I highly recommend installing a SCSS Intellisense library such as SCSS Intellisense by mrmlnc for VScode. This will show you a popup of parameter names as you type mixins in from the documentation.

Overview

Mixins

@include setSize(auto, auto); // $width, $height
@include setMarginPadding(auto, auto); // $margin, $padding
@include setPosition(
  static,
  auto,
  auto,
  auto,
  auto
); // $position, $top, $left, $bottom, $right
@include setDisplay(
  inline,
  static,
  auto,
  auto
); // $display, $position, $top, $left
@include setFlex(
  normal,
  normal,
  normal,
  row,
  nowrap
); // $justifyC, $alignI, $alignC, $flexDir, $flexWrap
// Absoultely centers selector the old fashion way, the ol block/transform ;)
@include absoluteCenter();
// Disables ability to select (highlight with mouse drag) text or image on element
@include disableSelect();
@include onHoverBoxShadow(
  1s,
  0px,
  -5px,
  0px,
  3px,
  rgb(0, 0, 0, 0.5)
); // $duration, $LRsides, $TBsides, $all, $blur

Responsive

@include mobile-s {
  // 320px width or less specific content
}
@include mobile-m {
  // 375px width or less specific content
}
@include mobile-l {
  // 425px width or less specific content
}
@include tablet {
  // 768px width or less specific content
}
@include laptop {
  // 1024px width or less specific content
}
@include laptop-l {
  // 1440px width or less specific content
}
@include four-k {
  // 2560px width or less specific content
}