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

bourbon-neat-utils

v1.1.4

Published

An extension for Bourbon Neat.

Downloads

3

Readme

Check the demo website for examples

Bourbon Neat Utils

An extension for Bourbon Neat

Installation

Make sure you have installed bourbon-neat.

$ npm install bourbon-neat-utils --save

Import the package into your Sass file.

@import "neat-utils";

Usage

See all the examples on the demo website.

.block {
  @include container;
}
.block__element {
  // use one mxin for all the breakpoints
  @include columns(8 8 12 12);
}

Settings

The breakpoints are already defined in the $grids-default variable, but of course you can overwrite them. Create a Sass file like settings/grid.scss.

Grid breakpoints You can overwrite these settings.

$grid-mobile:    (columns: 8,  gutter: 16px, media: 320px,  max-width: 100%,   color: orange);
$grid-portrait:  (columns: 8,  gutter: 20px, media: 560px,  max-width: 100%,   color: lime);
$grid-landscape: (columns: 12, gutter: 30px, media: 1024px, max-width: 100%,   color: tomato);
$grid-desktop:   (columns: 12, gutter: 30px, media: 1280px, max-width: 1280px, color: plum);

// don't forget to set the new breakpoints
$grids-default: ( mobile: $grid-mobile, portrait: $grid-portrait, landscape: $grid-landscape, desktop: $grid-desktop);

Multiple grid sets

// Use the basic breakpoints and overwrite params: color, columns, gutter, media and max-width.
$grids-special: (
  mobile: map-merge($grid-mobile, (columns: 4, gutter: 20px)),
  portrait: map-merge($grid-portrait, (columns: 4)),
  landscape: map-merge($grid-landscape, (columns: 10, color: olive)),
  desktop: map-merge($grid-desktop, (columns: 10, max-width: 100%))
);

// Now you can use the $grids-default (default set) and your $grids-special-breakpoints set.
.block {
  @include container($grids: $grids-special);
}
.block__element {
  @include columns(2 2 3 3, $grids: $grids-special);
}

Container alignment options: left, right and center as default

$container-alignment: left;

Setup hotkeys

Put this piece of code into your javascript file.

import { initializeNeatHotkeys } from 'bourbon-neat-utils';

// You can get this value from the environment.
const production = false;

// You don't want to use this function in your production environment.
if (!production) {

  const options = {
    useCookies: true,
    visualizeGrid: true
  }

  initializeNeatHotkeys(options);
}

| option | type | default | description | |--|--|--|--| | useCookies | boolean | false | Enable this parameter if you want to keep your toggle before refreshing the page. It will place a cookie 'visualize-grid' and toggles a "visualize-grid" class on your HTML tag.| |visualizeGrid | boolean | false | Visualize the grid for the first time. After that, the cookie (if you enabled the 'useCookies' option) will take over this value.|

Use hotkeys

keys | action --|-- ctrl + l | toggle columns

Remove hotkeys

import { removeNeatHotkeys } from 'bourbon-neat-utils';

// You can remove the hotkeys. It will delete the cookie if it's set.
removeNeatHotkeys();