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

gridbox

v2.0.0

Published

A responsive 12-column grid layout based on CSS Grid Layout.

Downloads

5

Readme

GridBox v2

A responsive, fluid 12-column css grid framework based on CSS Grid Layout module.

  • Nestable
  • Mobile First
  • Semantic class names

What is CSS Grid Layout?

CSS Grid Layout is a two-dimensional layout system, optimized for customizable column and row layouts.

Getting Started

NPM

npm install --save gridbox

Import

// ES5
require('gridbox/gridbox.css')

// ES6
import "gridbox/gridbox.css"

Or you can use this CDN and add it in your head tag

<link rel="stylesheet" href="https://unpkg.com/gridbox/gridbox.css">

Guidelines

  • Unlike Bootstrap's grid system, you do not need to include a row class.
  • Nesting should be done by adding the sub-item class with the column class.
  • .col-xs-* should not be nested under a row that has a .col-xs-* parent.
  • Content should be placed within columns unless you are nesting child columns.
  • Any child div of within the gridbox container will default to the full width of the parent.
  • Gutters are set to 1rem (16px) as default and go up to 1.5rem (24px) on screens larger than 960px wide.
  • Use for the header, for the main content body, and for the footer.
  • Columns go from 1 to 12.
  • Breakpoints:
    • 0px - 599px (col-xs-*)
    • 600px - 959px (col-sm-*)
    • 960px - 1279px (col-md-*)
    • 1280px - 1919px (col-lg-*)
    • 1920px and above (col-xl-*)

Example

<div class="container">
    <header>Header</header>
    <main>
        <div class="col-md-8 sub-items">
            <div class="col-md-4">col-md-4</div>
            <div class="col-md-4">col-md-4</div>
            <div class="col-md-4">col-md-4</div>
        </div>
        <div class="col-md-4 sub-items">
            <div class="col-md-6">col-md-6</div>
            <div class="col-md-6">col-md-6</div>
            <div class="col-sm-12">col-sm-12</div>
        </div>
        <div class="col-xs-3">col-xs-3</div>
        <div class="col-xs-9">col-xs-9</div>
    </main>
    <footer>Footer</footer>
</div>

Demo

Codepen demo for v2: https://codepen.io/epohsiereht/pen/aWPpZd

Differences between v1 and v2

Version 1 followed the same syntax as Bootstrap. After receiving feedback from Rachel Andrew, I realized that Grid Layout is about semantic class names rather than presentational class names. So I removed the row wrapper and opted to just add a sub-items class along with the column class to set up nested columns.

  1. Removed the row class wrapper.
  2. To nest, you just need to add .sub-items class along with the column class.
  3. Added grids for <header>, <main>, and <footer> tags.

Browser Support

| Browser | Compatibility | Version | | ------------------- |-------------------------| ------- | | Chrome | YES | 57+ | | FireFox | YES | 52+ | | Safari | YES | 10.1 | | Opera | YES | 44+ | | IE | PARTIAL | 11* | | Edge | PARTIAL | 14*, 15* | | iOS Safari | YES | 10.3 | | Chrome for Android | YES | 57 | | Android Browser | NO | | | Opera Mobile | NO | | | Opera Mini | NO | |

Note: Partial support for IE and Edge is based on an older specification of CSS Grid from 2011.

Future Features++

  • Add offset column classes.
  • Add vertical and horizontal alignment classes.
  • Add design guidelines for typography, forms, buttons, etc.
  • Add pre-built and reusable component layouts using CSS Grid and Flexbox Layout modules.

Resources