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

backline-grid

v1.0.1

Published

A simple SCSS responsive grid

Downloads

313

Readme

Backline Grid

A scss port of responsive-grid.

A simple inline-block based responsive grid, with IE8+ browser support. Only outputs the styles specified to avoid CSS full of unused widths.

Installation

npm install --save backline-grid

or

yarn add backline-grid

Add backline-grid to your node-sass includePaths option.

{
  loader: 'sass-loader',
  options: {
    includePaths: [
      ...require('backline-grid').includePaths
    ]
  }
}

Import backline-grid in each .scss as required

@import 'backline-grid';

Usage

Responsive Grid provides a collection of mixins for use.

grid-base()

This will set up the block .grid class and the element .grid__item class.


grid-widths($namespace, $columns)

This will set up width classes based on the $columns you include.

Examples

  • grid-widths('', 1 3 6) will set up a whole class, thirds classes, and sixths classes.
  • grid-widths('desktop', 1 2 3) will set up a .{$namespace} class for each of the width classes.

The following variables can be used to change the in-built naming convention, for example, when using with a different language

| Variable name | Type | Default | Description | | ---------------------- | ---- | ---------------------------- | --------------------------------------------------- | | $grid--count-names | list | one two three … sixteen | Forms the first half of the grid widths class name | | $grid--fraction-names | list | whole half third … sixteenth | Forms the second half of the grid widths class name |


grid-pull($namespace, $columns)

This will set up pull classes based on the $columns you include.

Examples

  • grid-pull('', 1 3 6) will set up .pull-{width} classes that move the .grid__item with a whole class, thirds classes, and sixths classes.
  • grid-pull('desk', 1 2 3) will set up a .{$namespace}pull-{width} class for each of the pull classes.

grid-push($namespace, $columns)

This will set up push classes based on the $columns you include.

Examples

  • grid-push('', 1 3 6) will set up .push-{width} classes that move the .grid__item with a whole class, thirds classes, and sixths classes.
  • grid-push('desk', 1 2 3) will set up a .{$namespace}push-{width} class for each of the push classes.

grid-gutter-modifier($namespace, $gutter)

This will set up the gutter modifier .grid--{$namespace} class and .grid__item child selector which modify the gutter width. Providing an optional $namespace allows the mixin to be used to change the base grid gutter at different breakpoints.

Examples

  • grid-gutter-modifier('', 10px) will set up a .grid class that will provide a 10px gutter between each .grid__item.
  • grid-gutter-modifier('em', 1em) will set up a .grid--em class that will provide a 1em gutter between each .grid__item.
  • grid-gutter-modifier('percent', 10%) will set up a .grid--percent class that will provide a 10% gutter between each .grid__item.
  • grid-gutter-modifier('pixel', 20px) will set up a .grid--pixel class that will provide a 20px gutter between each .grid__item.

grid-reverse($namespace)

This will set up modifier .grid--reverse class that, when applied, will visually reverse the DOM order of the .grid__item's. Providing a $namespace is optional.


grid-uncompressed()

Adds a slightly-hacky workaround for non-compressed HTML (avoid if possible)


Development

Clone this repo and install dependencies. All styles have test coverage and Prettier formatting to ensure everything works as expected.

Running Tests

yarn test