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

bluprint.css

v0.1.1

Published

Lightweight customizable responsive CSS grid

Downloads

3

Readme

Bluprint

Bluprint is a customizable minimalistic responsive CSS grid packed with multiple useful helper classes and generators.

  • Responsive CSS grid (as in Bootstrap or Foundation).
  • Easily customizable grid, tiers and class names.
  • Lightweight (<1KB gzipped).
  • Helper classes for responsive visibility, paddings, resets.
  • Generators to create stylish buttons.

Installation

Step 1

Option A

Install Bluprint via NPM, Yarn or Bower:

npm i bluprint.css

yarn add bluprint.css

bower install bluprint.css

Option B

You can also manually download and unzip the package:

Step 2

Finally, include the CSS in your page section.

<link rel="stylesheet" href="dist/normalize.min.css">
<link rel="stylesheet" href="dist/bluprint.min.css">

Normalize.css is not mandatory but highly recommended: this library is used to reduce cross-browser rendering inconsistency.

CDN

Alternatively, you can include the CSS via CDN without downloading or installing any local files:

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/7.0.0/normalize.min.css">
<link rel="stylesheet" href="https://gitcdn.link/repo/kefir500/bluprint/master/dist/bluprint.min.css">

Grid

Rows

The conception of grid is pretty straightforward: it consists of containers called rows (.row). Rows, in turn, are wrappers for columns (.col).

Tiers

Tiers are based on screen size ranges and used for responsive column stacking.

The default grid layout consists of 12 columns. Your block can take any amount of these columns from 1 to 12 accordingly. For responsive layouts different number of columns can be taken for the specific screen size:

  • .xs-* takes * columns on any screen.
  • .sm-* takes * columns on screens ≥768px wide.
  • .md-* takes * columns on screens ≥992px wide.
  • .lg-* takes * columns on screens ≥1200px wide.
  • * is a number of columns to occupy from 1 to 12. The screen size classes are applied (and being overridden) from smaller to bigger ones.

These tiers as well as the grid layout can be easily customized according to your needs.

Fixed Columns

The following blocks take the fixed amount of columns on different screen sizes.

<div class="row">
    <div class="col xs-12"></div>
    <div class="col xs-6"></div>
    <div class="col xs-6"></div>
    <div class="col xs-4"></div>
    <div class="col xs-4"></div>
    <div class="col xs-4"></div>
</div>

Demo

Responsive Columns

The following example demonstrates the responsive layout where each block takes the specified number of columns on different screens:

  • 12 columns (of 12) on xs (extra small) screens.
  • 6 columns (of 12) on sm (small) screens.
  • 4 columns (of 12) on md (medium) screens (except for the first column).
  • 3 columns (of 12) on lg (large) screens.

Columns stack depending on the current screen size.

<div class="row">
    <div class="col xs-12 sm-6 md-12 lg-3"></div>
    <div class="col xs-12 sm-6 md-4 lg-3"></div>
    <div class="col xs-12 sm-6 md-4 lg-3"></div>
    <div class="col xs-12 sm-6 md-4 lg-3"></div>
</div>

Demo

Nested Columns

Columns can be nested in multiple levels. Wrap each level in a .row class in order to zero out the inner padding.

<div class="row">
    <div class="col xs-12 sm-6">
        <div class="row">
            <div class="col xs-12"></div>
            <div class="col xs-6"></div>
            <div class="col xs-6"></div>
        </div>
    </div>
    <div class="col xs-12 sm-6">
        <div class="row">
            <div class="col xs-4"></div>
            <div class="col xs-4"></div>
            <div class="col xs-4"></div>
            <div class="col xs-3"></div>
            <div class="col xs-3"></div>
            <div class="col xs-3"></div>
            <div class="col xs-3"></div>
        </div>
    </div>
</div>

Demo

Customization

In order to customize the grid tiers / columns number, size / generate button classes, run npm install in the root directory to install the required dependencies. Then you can simply edit the scss/_config.scss file and build your CSS file with gulp build command. For better understanding of the following variables read the Tiers section.

Variables

Variable | Description | Default ---------------------------|--------------------------------------------|---------------- $grid-columns | Number of columns in a layout row. | 12 $grid-gutter | Half-width of a gap between columns. | 8px $class-row | Base class name for a row container. | row $class-column-base | Base class name for columns. | col $class-column-responsive | Class name pattern for responsive columns. | [TIER]-[SIZE]

  • [TIER] is replaced with a screen size tier.
  • [SIZE] is replaced with a column size.

Tiers

The $tiers map contains tiers which respresent the screen size breakpoints for stacking responsive columns. The corresponding classes are generated based on this variable.

$tiers: (
  xs: 0,
  sm: 768,
  md: 992,
  lg: 1200
);

Tier | Screen Size -----|------------ xs | ≥ 0 sm | ≥ 768 md | ≥ 992 lg | ≥ 1200

You can create any number of screen size tiers with your own names and breakpoints according to your needs, for example:

$tiers: (
  mobile: 0,
  tablet: 700,
  laptop: 1200,
  desktop: 1600
);

Buttons

You can also generate stylish flat buttons with automatically calculated hover and click effects.

SCSS
$buttons: (
  primary: #1a98ff,
  success: #76bd42,
  danger: #e65e57
);
HTML
<a class="btn btn--primary">Primary</a>
<a class="btn btn--success">Success</a>
<a class="btn btn--danger">Danger</a>

Demo

If you don't need any buttons, simply remove this variable.