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 🙏

© 2025 – Pkg Stats / Ryan Hefner

handy.sass.mixins

v1.2.5

Published

frontEnd package with scss mixins for images and texts , directional styles also included

Readme

handy.Sass.Mixins

A collection of mixins for responsive images , dynamic directional styles, predefined text rows count and keyframes

Installation

To install the package just type the following

npm install handy.sass.mixins --save

How To Use

after installing the package , include shared.scss file

@import 'handy.sass.mixins/scss/shared.scss' ;

Files Included

there are two main files included in the package :

Handy Mixins
Directional mixins for rtl and ltr

Imortant Notes

Direction mixins uses dir html attribute so you need to specify that attribute's value

<html dir="ltr">
	<heade>
		<!--meta tags and links here-->
	</heade>
	<body>
		<!--Your body here-->
	</body>
</html>
  • float-right(): floats the element to the right if the dir attribute equals 'ltr' else to the left

  • float-left(): floats the element to the left if the dir attribute equals 'ltr' else to the right

  • position-right($value):places the element to the right by the specified value if the dir attribute equals 'ltr' else to the left

  • position-left($value):places the element to the left by the specified value if the dir attribute equals 'ltr' else to the right

  • text-align(): aligns the text to the left if dir attribute equals 'ltr', else aligns it the to the right

  • text-align-reverse(): aligns the text to the right if dir attribute equals 'ltr', else aligns it the to the left

  • padding-right($value): applies padding to the right of the element by the specified value if dir attribute equals 'ltr' ,else applies it to the left

  • padding-left($value): applies padding to the left of the element by the specified value if dir attribute equals 'ltr' ,else applies it to the right

  • margin-right($value): applies margin to the right of the element by the specified value if dir attribute equals 'ltr' ,else applies it to the left

  • margin-left($value): applies margin to the left of the element by the specified value if dir attribute equals 'ltr' ,else applies it to the right

  • border-right($value): draws right border the specified value if dir attribute equals 'ltr' ,else draws left border.

  • border-left($value): draws left border the specified value if dir attribute equals 'ltr' ,else draws right border.

  • border-radius-directional($value): applies left top and bottom border radius if dir attribute equals 'ltr' , else applies right top and bottom border radius by the specified value

  • flex-row-direction(): assigns flex-direction's value to row if dir attribute equals 'ltr' ,else the value will be row-reverse , (note: no need for this mixin with bootstrap 4 )

  • direction(): assigns direction's property value to 'ltr' if the the dir attribute equals 'ltr' , else assigns 'rtl'.

  • direction-reverse(): assigns direction's property value to 'rtl' if the the dir attribute equals 'ltr' , else assigns 'ltr'.

  • background-directional-img( $left-img, $right-img): background-image value will be equal to the $left-img if the dir attribute equals 'ltr' else will be equal to $right-img.

  • background-position-x-left():assigns the background-position-x property to the left if the dir attribute equals 'ltr' else to the right.

  • background-position-x-right():assigns the background-position-x property to the right if the dir attribute equals 'ltr' else to the left.

  • Keyframes($animationName):this mixin for dynamically creating @keframes prefixes
    Implementation Example:
@include keyframes(myanimation) {
  0%{
      //properties
    }
  100%{
       //properties
     }
}
  • multiline-ellipses($font-size, $line-height, $lines, $width:100%):this mixin helps you specify how many line the element should take after specifying the desired number of lines , font-size and line-height . Implementation Example:
p{ 
  @include multiline-ellipses(16px,1.2,2)

}
  • aspect-ratio($width, $height): for responsive images that maintains specified aspect ratio .
    Implementation Example:
    HTML structure :
<div class="img-container">
  <div class="content">
    <img src="pathto/image"/>
    <!--any other element-->
  </div>
</div>

SCSS :

.img-container {
  @include aspect-ratio(16,9);/*Desired Aspect Ratio*/
  img{
      width:100%;
      height:100%;
     }
}