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

grid-system

v0.1.0

Published

This repository contains a small grid system for easy application development. It supports 24 columns as well as `RTL` and `LTR` layouts.

Downloads

29

Readme

Grid System

This repository contains a small grid system for easy application development. It supports 24 columns as well as RTL and LTR layouts.

Browsers that support media queries should be supported.

Features

  • 24 column grid
  • Responsive
  • No margin or padding added

Why a new grid system?

Currently any grid system I could find made assumptions about the layout and the style of the code. They assume some kind of padding or margin must take place for the grid. When padding is forced on the grid it causes styles to conflict and alignment to be off when grids become nested.

This library aims to only supply a grid system. If you want a specific padding width, then add that style. If you want a specific margin width this library will not support it easily.

By default most grid systems use 12 columns. I've found that the 12 column width is often not enough. So to get the best of the math that 12 provides and a bit more space, this system defaults to 24 columns.

Philosophy

A grid system should:

  • Make laying out content easy
  • Make no assumptions about its contents
  • Never apply styles such as padding or margin

If a consumer wishes to have default padding or margin think about applying this padding or margin to the components on the site. Try to avoid putting styles into your grid system. It conflates layout and styling which causes many headaches later in CSS development.

Usage

Code can be found in the css build/grid.css file.

<html dir="ltr">
    <head>
        <style src="path/to/stylesheet"></style>
    </head>
    <body>
        <div class="row">
            <div class="column column-xs-12 column-md-15 column-lg-20">Info</div>
            <div class="column column-xs-12 column-md-9 column-lg-4">Other Info</div>
        </div>
    </body>
</html>

.column-* classes must exist inside a .row class. When using a .column-* class it must be prefaced with a .column class. This is done to separate the layouts into what is common for all columns and what is specific for each media query set of columns.

Details

Check out the source src/grid_system.less file. It has a lot of comments on what it is doing.

Developing/testing

Run the following two commands in separate terminal windows to test out the grid system.

  1. grunt
  2. cd example && python -m SimpleHTTPServer