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

macx-sass-mixins

v0.3.1

Published

SASS Mixins

Downloads

3

Readme

Mobile first Sass Mixins – based on simplicity

Build Status Mobile first Unicorn approved

There are a lot of Sass Mixins out there. Most of them are overdone, because they want to fit for everyone – no matter if you prefer mobile first or any other approach.

This Mixins from David Maciejwski and contributors is different. It's mobile first and will only generate classes that are really needed to do the trick.

Feature

  • Highly flexible Grid with push and pull methods based on your configuration
  • Effective Respond-Mixin to set `@media triggers (from, to)
  • font-smoothing Mixin for better font rendering on dark backgrounds
  • Flexible asset floating
  • clearfix

Installation

Use Bower to download it to your project:

$ bower install macx-sass-mixins --save

Now, set your personal configuration for the Grid and import the mixins as soon as possible in your main Sass file:

@charset 'UTF-8';

// Import or set here your Grid config:
@import 'config';

// macx-sass-mixin
// (set the path to bower vendors based on your config)
@import '[path-to]/macx-sass-mixins/src/sass-mixins';

To find out the path to your Bower dependencies, type bower list --paths in your command line.

Usage

Grid

The Grid is simple as it could be but flexible as it should be. It's based on the following configuration. The default settings are the following:

// Maximal width of your layout
$layout-max-width: 1200px;

// Number of columns you want to use
$layout-max-columns: 12;

// Set gutter width and default spacing
// to the outer areas of your layout
$layout-gutter-width: percentage(20px/$layout-max-width);
$layout-spacing: 24px;

// Set the breakpoints and the names
// you want to use for later usage
$layout-breakpoints: (
  small: 480px,
  medium: 600px,
  large: 920px,
  xlarge: $layout-max-width
) !default;

Here is simple three column layout on desktop, two column layout on tablets and one column on mobile:

<div class="l-constrained">
  <div class="l-units">
    <div class="l-u--12-12 l-u--medium-6-12 l-u--large-4-12">
      COLUMN 1
    </div>

    <div class="l-u--12-12 l-u--medium-6-12 l-u--large-4-12">
      COLUMN 2
    </div>
    
    <div class="l-u--12-12 l-u--medium-6-12 l-u--large-4-12">
      COLUMN 3
    </div>
  </div>
</div>

Remeber the following syntax to set a grid column class:

l-u--medium-6-12
│    │      │ └ max columns
│    │      └ number of columns you want to use (6/12)
│    └ name of the breakpoint
└ stands for: layout-unit

Flexible asset floating

Don't write CSS for floated assets (images for example) for every size. Use this approach to align your media – no matter of assets size.

<!-- Default usage -->
<div class="m-asset">
  <div class="m-asset__element">
    <img src="your-image.jpg" alt="">
  </div>

  <div class="m-asset__content">
    This Content will always stay beside the element.
  </div>
</div>

<!-- If you want to push the asset to the right -->
<div class="m-asset m-asset__pushed">
  ...
</div>