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

mixgen

v2.0.0

Published

Mixins generators for SASS & LESS.

Downloads

376

Readme

Mixgen

Mixgen is a library that will help you to simplify your css.

The idea of this library is to generate classes that will be directly used in your HTML, you will not have to create weird class name because you need to add a specific css property.

Getting stated

Optionally: to install with bower, use:

bower install mixgen --save
npm install mixgen --save

Add Mixin Styles

Add the sass module you need, and call the mixin to generate your classes.

Ex: If you want to generate generic padding classes you will add the padding.scss file and call the mixin like that:

@include generate-paddings();

By default some mixin are using default values located in the variables.scss

Generic Mixin Class Generator

All mixin used to generate your css classes are using the generic mixin called css-generator, this mixin allows you to generate any css class you need.

How it's work

Mixin definition :

@mixin css-generator($className, $cssProperty, $values, $breakpoints);

| Arguments | Type | Description | |--------------|------------------------|--------------------------------------------------------------------------------------------------| | $className | String | The name of your generated class name | | $cssProperty | Css property | The css property to use (Ex: padding, background-color, ...) | | $values | (List of map) or (map) | The generated values for the css property and optionally class name concatenated with $className | | $breakpoints | Map | The breakpoints values (Ex: ('xs': 0, 'sm': 544px, 'md': 768px, 'lg': 992px, 'xl': 1200px)) |

Example 1

@include css-generator($className: 'color', $cssProperty: color, $values: ('red': #ff0000), $breakpoints: (xs: 0, sm: 544px));

will generate

.color-red-xs {
  color: #ff0000 !important; }

@media (min-width: 544px) {
  .color-red-sm {
    color: #ff0000 !important; } }

Example 2

@include css-generator($className: 'border-top', $cssProperty: border-top, $values: (('xs': 1px), solid, ('red': #ff0000)), $breakpoints: null);

will generate

.border-top-xs-red {
  border-top: 1px solid #ff0000 !important; }

Advanced example :

css-generator('box-shadow', box-shadow, (('h10': 10px), ('v10': 10px), ('s5': 5px), ('red': red)), null);

will generate

.box-shadow-h10-v10-s5-red {
  box-shadow: 10px 10px 5px red !important; }

Included mixin

All mixin using the breakpoints to disable it you have to set the $breakpoints value to null

Borders

| Arguments | Type | Required | Description | |--------------|--------------|----------------------------------------------------|---------------------------------------------------------------------------------------------| | $colors | Map | true | The color you want to apply to the border (Ex: ('red': #ffffff, 'blue': #ffffff)) | | $values | Map | optional (default values used from variables.scss) | The differents values to apply to this border (Ex: ('xs': 1px, 'sm': 2px)) | | $type | Css property | optional (default value is solid) | The type of the border (Ex: solid, dotted ...) | | $breakpoints | Map | optional (default values used from variables.scss) | The breakpoints values (Ex: ('xs': 0, 'sm': 544px, 'md': 768px, 'lg': 992px, 'xl': 1200px)) |

Colors (will generate the background-color and text-color class)

| Arguments | Type | Required | Description | |--------------|-------------|----------------------------------------------------|---------------------------------------------------------------------------------------------| | $colors | List or Map | true | The color you want to apply to the border (Ex: ('red': red, 'white': white)) | | $breakpoints | Map | optional (default values used from varaibles.scss) | The breakpoints values (Ex: ('xs': 0, 'sm': 544px, 'md': 768px, 'lg': 992px, 'xl': 1200px)) |

Float (will generate the pull-left and pull-right)

| Arguments | Type | Required | Description | |--------------|------|----------------------------------------------------|---------------------------------------------------------------------------------------------| | $breakpoints | Map | optional (default values used from varaibles.scss) | The breakpoints values (Ex: ('xs': 0, 'sm': 544px, 'md': 768px, 'lg': 992px, 'xl': 1200px)) |

Line Height

| Arguments | Type | Required | Description | |--------------|------|----------------------------------------------------|---------------------------------------------------------------------------------------------| | $values | Map | optional (default values used from variables.scss) | The differents values to apply to this border (Ex: ('xs': 1, 'sm': 2)) | | $breakpoints | Map | optional (default values used from varaibles.scss) | The breakpoints values (Ex: ('xs': 0, 'sm': 544px, 'md': 768px, 'lg': 992px, 'xl': 1200px)) |

Margins and Paddings

| Arguments | Type | Required | Description | |--------------|----------------------|----------------------------------------------------|---------------------------------------------------------------------------------------------| | $sizes | Map | optional (default values used from variables.scss) | The differents values to apply to this border (Ex: ('xs': 1px, 'sm': 2px)) | | $sides | List of css property | optional (default value used from variables.scss) | The type of the border (Ex: left, right, bottom) | | $breakpoints | Map | optional (default values used from varaibles.scss) | The breakpoints values (Ex: ('xs': 0, 'sm': 544px, 'md': 768px, 'lg': 992px, 'xl': 1200px)) |

Text align

| Arguments | Type | Required | Description | |--------------|----------------------|----------------------------------------------------|---------------------------------------------------------------------------------------------| | $sides | List of css property | optional (default value used from variables.scss) | The type of the border (Ex: left, center, right) | | $breakpoints | Map | optional (default values used from varaibles.scss) | The breakpoints values (Ex: ('xs': 0, 'sm': 544px, 'md': 768px, 'lg': 992px, 'xl': 1200px)) |

Texts

| Arguments | Type | Required | Description | |--------------|------|----------------------------------------------------|---------------------------------------------------------------------------------------------| | $sizes | Map | optional (default values used from variables.scss) | The differents values to apply to this border (Ex: ('xs': 10px, 'sm': 15px)) | | $breakpoints | Map | optional (default values used from varaibles.scss) | The breakpoints values (Ex: ('xs': 0, 'sm': 544px, 'md': 768px, 'lg': 992px, 'xl': 1200px)) |