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

atgrid.css

v4.0.0

Published

CSS Grid System with attribute selectors

Downloads

5

Readme

atGrid.css - CSS Grid System with attribute selectors

atGrid is a Flexbox-based CSS Grid System that uses attributes instead of classes.

## Examples

Columns with the same width

<div grid>
  <section column>
    <p>Auto</p>
  </section>

  <section column>
    <p>Auto</p>
  </section>
</div>

Columns with a determined width

<div grid>
  <section column="8">
    <p>8</p>
  </section>

  <section column="4">
    <p>4</p>
  </section>
</div>

Columns without gutters

<div grid="ng">
  <section column="8">
    <p>8</p>
  </section>

  <section column="4">
    <p>4</p>
  </section>
</div>

Columns with offsets

<div grid>
  <section column="3">
    <p>3</p>
  </section>

  <section column="3 +6">
    <p>3 +6</p>
  </section>
</div>

Columns with offsets and without gutters

<div grid="ng">
  <section column="5">
    <p>5</p>
  </section>

  <section column="5 +2">
    <p>5 +2</p>
  </section>
</div>

### Nested grids

<div grid>
  <section column="4">
    <p>4</p>
  </section>

  <section column="8">
    <div grid>
      <section column="6">
        <p>6 > 8</p>
      </section>

      <section column="6">
        <p>6 > 8</p>
      </section>
    </div>
  </section>
</div>

Nested grids without gutters

<div grid="ng">
  <section column="4">
    <p>4</p>
  </section>

  <section column="8">
    <div grid="ng">
      <section column="6">
        <p>6 > 8</p>
      </section>

      <section column="6">
        <p>6 > 8</p>
      </section>
    </div>
  </section>
</div>

Installation

$ npm install atgrid.css

Browser Compatibility

Since version 4.0.0, atGrid.css is based on Flexbox, you can see the table of compatibility in the Can I Use site.

HTML Attributes

container Sets the element as a container, the container element will have a fixed max-width and will be centered on the page.

grid Sets the element as a grid element. This is a required element, and should be direct parent of the column elements.

column Sets the element as a column, should always be used inside a grid element. A column can also contain a grid element to nest grids.

Attribute values

Container

The container element doesn't accept any values.

Grid

ng Will create a grid where the columns doesn't have gutters.

top Aligns all the columns inside vertically to the top of the grid.

center Aligns all the columns inside vertically to the center of the grid.

bottom Aligns all the columns inside vertically to the bottom of the grid.

Column

<width> The width of the column, by default from 1 to 12.

+<offset> The offset of the column, by default from 1 to 11.

top Aligns the column vertically to the top of the grid.

center Aligns the column vertically to the center of the grid.

bottom Aligns the column vertically to the bottom of the grid.

Sass configuration

container-width Default: 1200px Description: Maximum width of the container element.

gutter Default: 2em Description: Space between columns.

num-columns Default: 12 Description: Number of columns.

prefix Default: '' Description: Prefix for the attributes, use data- if you need valid HTML.

breakpoint Default: 420px Description: Below this point the columns are expanded to 100%.

License

The MIT License - James Kolce