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

postgrid

v1.0.1

Published

> A fully responsive flexbox grid helper.

Downloads

4

Readme

postgrid

A fully responsive flexbox grid helper.

Installation

Install the package:

$ npm install postgrid --save

And load it in the postcss plugins list. For more information on how to install a plugin see the PostCSS docs

Example

Columns should always be wrapped inside a flex-wrapper. The following example results in:

  • A full width, one column grid. (All columns are 1/1).
  • At breakpoint $m it will have 3 even columns (All columns are 1/3).
<div :class="$style.flexWrapper">
  <div :class="$style.col">1/3</div>
  <div :class="$style.col">1/3</div>
  <div :class="$style.col">1/3</div>
</div>
.flex-wrapper {
  wrapper: 1280px;
}

.col {
  col: 1 1;

  @media ($m) {
  	col: 1 3;
  }
}

Columns

The grid comes with 12 fluid columns:

Columns

Example:

  .col {
	col: 1 4;
  }

Vertical alignment

Vertical alignment

| Compose | Renders | Description | |--------|--------|--------| | top | align-items: flex-start; | Aligns columns to top | | middle | align-items: center; | Aligns columns to middle | | bottom | align-items: flex-end; | Aligns columns to bottom |

These styles can only be applied to a flex-grid wrapper.

Example:

  .flex-grid {
    align: top;
  }

Horizontal alignment

Horizontal alignment

| Compose | Renders | Description | |--------|--------|--------| | left | justify-content: flex-start; | Aligns columns to left | | center | justify-content: center; | Aligns columns to center | | right | justify-content: flex-end; | Aligns columns to right |

These styles can only be applied to a flex-grid wrapper.

Example:

  .col {
	align: right;
  }

Align self

Column specific alignment.

| Compose | Renders | Description | |--------|--------|--------| | top | align-self: flex-start; | Aligns this column to top | | middle | align-self: center; | Aligns this column to center | | bottom | align-self: flex-end; | Aligns this column to bottom |

These compose styles can only be applied to a column.

Example:

  .col {
    align-self: center;
  }

Align content

Aligns a flex container's lines within when there is extra space in the cross-axis, similar to how justify-content aligns individual items within the main-axis.

Note: this property has no effect when there is only one line of flex items.

Spacing

Space around

Lines evenly distributed with equal space around each line.

Example:

.flex-grid {
  space: around
}

Space between

lines evenly distributed; the first line is at the start of the container while the last one is at the end.

Example:
.flex-grid {
  space: between
}

Gutters

Using a transparent border combined with background-clip: padding-box enables you to use percentages on cols without the need to calc gutters.

Important: When using gutters be sure to compose the corresponding gutter-fix on the flex-grid wrapper:

.flex-grid {
  gutter: 20px;
}

Note: If you need a solid border around your column use an extra div inside the column.

Gutters

Push

Push columns to the right based on col width.

Push

Example:

.col {
  push: 1 4;
}