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

sass-griddle

v2.0.0

Published

Simple set of Sass abstractions for CSS Grid

Downloads

47

Readme

GRIDdle Build Status

                          (    (         
                          )\ ) )\   (   
   ____ ____  ___ ____   (()/(((_) ))\  
  / ___|  _ \|_ _|  _ \   ((_))_  /((_) 
 | |  _| |_) || || | | |  _| || |(_))   
 | |_| |  _ < | || |_| |/ _` || |/ -_)  
  \____|_| \_\___|____/ \__,_||_|\___|  

A simple set of helpers for working with CSS Grid.

Getting Started

GRIDdle is not a Grid Framework for CSS Grids. Rather, it's a set of helpers for writing sets of common CSS Grid properties together, in language that is likely to be more familiar to those who have used tools like Susy, Singularity, Foundation, or Bootstrap. There is no magic, just CSS Grids, so be sure you have brushed up on the docs and take a look at CSS Trick's Complete Guide to Grid before using.

Installation

GRIDdle is distributed as an NPM Module optimized for use with Eyeglass (if you're using it). To install, run the following:

$ npm install sass-griddle --save-dev

Then, in your Sass, import GRIDdle:

@import 'griddle'; // Or path to _griddle.scss if not using Eyeglass

Usage

Grid Setup Helpers

grid($grid, $gap) / columns($grid, $gap) [mixin]

Mixins to define grid columns.

  • $grid - The grid to use for columns
  • $gap - The gap between each column. Will apply to both column and row gap

Sample Input

.container {
  @include grid(100px 1fr 2fr, 1em); // @include columns
}

Sample Output

.container {
  display: grid;
  grid-gap: 1em;
  grid-template-columns: 100px 1fr 2fr;
}

vertical-grid($grid, $gap) / rows($grid, $gap) [mixin]

Mixins to define grid rows.

  • $grid - The grid to use for rows.
  • $gap - The gap between each row

Sample Input

.container {
  @include vertical-grid(2fr 1fr 2fr, 1em); // @include rows
}

Sample Output

.container {
  display: grid;
  grid-row-gap: 1em;
  grid-template-rows: 2fr 1fr 2fr;
}

Span Helpers

span($span, [$start]) / column-span($span, [$start]) [mixin]

A mixin to span a number of columns.

  • $span - The number of columns to span
  • $start - The column to start the span at (optional)

Sample Input

.item {
  @include span(3, 1); // @include column-span
}
.item-2 {
  @include span(4); // @include column-span
}

Sample Output

.item {
  grid-column: 1 / span 3;
}
.item-2 {
  grid-column: span 4;
}

vertical-span($span, [$start]) / row-span($span, [$start]) [mixin]

Mixins to span a number of rows.

  • $span - The number of row to span
  • $start - The row to start the span at (optional)

Sample Input

.item {
  @include vertical-span(1, 2); // @include row-span
}
.item-2 {
  @include vertical-span(5); // @include row-span
}

Sample Output

.item {
  grid-row: 2 / span 1;
}
.item-2 {
  grid-row: span 5;
}