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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@infoprojects/baseline-grid

v2.0.0

Published

Responsive fluid grid system

Readme

Baseline grid

Node version

22 or higher.

Sass compiler

This package requires Dart Sass (sass). As of 2.0.0 it is no longer compatible with libsass (node-sass), which was discontinued upstream in 2020: the stylesheets use @use for the built-in modules, which libsass never implemented. Move your build to Dart Sass before upgrading.

Getting started

>  yarn
>  yarn gulp

Gulp tasks

  • gulp - run both tasks views and css
  • gulp views - compile pug files into html files
  • gulp css - compile scss files into css files

Tests

yarn test compiles every example in scss/ with Dart Sass and fails if one of them breaks. CI runs the same command on every push. Run it before releasing a new version.

Simple example

.grid-wrapper.wrapper_15
  .grid-container.container_15
    .grid-zone.grid_15
      - for (var x = 1; x <= 5; x++)
        .grid-blok.grid_3
          .grid-element
            .grid-edge
              p blok grid_3

Config properties

Listed below are all options, with their defaults

$baseline-default: (
  viewports: (
    (alias: "small", max: 480px, columns: 3, fluid: false, override-container: 0px),
    (alias: "medium", min: 481px, max: 768px, columns: 6, fluid: false, override-container: 0px),
    (alias: "large", min: 769px, columns: 12, fluid: false, override-container: 0px)
  ),
  zones: (
    (columns: 12, blocks: (12, 9, 6, 3))
  ),
  depth: 1,
  column-width: 80px,
  columns-large: 12,
  pushes: (),
  pulls: (),
  container-gutter: null,
  gutter: 0,
  outer-padding: 5px,
  inner-padding: 5px,
  debug-color: false
);

Viewports: settings to configurate viewport small/medium/large. You can also configurate all viewports with one setting. Dont forget the comma after the map because otherwise you get a error in the map-has-key function.

For example:

$baseline-config: (
  viewports: (
    (alias: "all", max: 1023px, columns: 12, fluid: true, override-container: 0px),
  ),
  ...
)

max: max-width. min: min-width. columns: total columns. fluid: if this setting is true, the screen size changes, the proportion of elements will stay the same. The container and wrapper width will be 100%. override-container: if set, the container width will be overwritten. Zones: for which zones do you need the grid sizes to be calculated Per zone: for which blocks do you need the grid sizes to be calculated. Column-width: the absolute size of one column. In a 12-columns grid with a column size of 80px, the total width of the container will be 960px; Depth: how deep grid-nesting rules are generated. Set to 0 to skip nesting selectors entirely. Columns-large: the total columns in a large viewport. Grid-mq-small and grid-mq-medium: media query settings, exposed as the $grid-mq-small and $grid-mq-medium variables for use in your own stylesheet. Note that these have no default: set them in $baseline-config or they resolve to null. Pushes and pulls: the setting to push and pull the grid to the right or left. For example:

.grid-wrapper.wrapper_12
  .grid-container.container_12
    .grid-zone.grid_12
      each column in [12]
        include includes/grid-blok
    .grid-zone.grid_9.push_3
      each column in [3, 3, 3, { prefix: 2, column: 5, suffix: 2 }, 6, 3, 3, 6, 9 ]
        include includes/grid-blok
    .grid-zone.grid_3.pull_9
      each column in [3, 3, 3, 3, 3]
        include includes/grid-blok

The grid-zone grid_9 will be pushed 3 columns to the right with push_3. And the grid-zone grid_3 will be pulled 9 columns to the left with pull_9. Therefore, in the large viewport you can switch grid-zone grid_9 and grid-zone grid_3 from their places. And because the push and pull setting can only be applied in a large viewport, as soon as the viewport changes to medium, these grids will switch places again. So with the pushes and pulls settings you can visibly manipulate the dom. container-gutter: if set, the total px will be added to the max-width for the grid-wrapper. gutter: the empty space between elements, in px, used to calculate the width of a grid-blok. With a gutter of 0 a grid-blok is 100% wide; with a gutter of 7.5 the width becomes calc(100% - 15px). outer-padding: padding left and right for grid-element. inner-padding: padding left and right for grid-title and grid-inside.

How to create your grid

  • Create a scss file
  • Define your config
  • Import "mixins/baseline-loader"

Example:

$baseline-config: (
  zones: (
    (columns: 12, blocks: (12, 9, 6, 3)),
    (columns: 9, blocks: (9, 6, 3)),
    (columns: 6, blocks: (6, 3)),
    (columns: 3, blocks: (3))
  ),
  column-width: 100px,
  gutter: 0,
  outer-padding: 10px,
  inner-padding: 10px
);

@import "mixins/baseline-loader";