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

wee-grid

v1.2.0

Published

An extremely simple, customizable, and responsive CSS grid

Downloads

3

Readme

License: MIT devDependencies Status

wee-grid

Wee-grid An extremely simple, customizable, and responsive CSS grid. Both media query breakpoints and number of grid columns are customizable. Wee-grid uses Sass for precompiling CSS and webpack for building the CSS asset.

Usage

Media Query Breakpoints

By default wee-grid uses a 12-column grid over 4 media query breakpoints. Media queries are configured for mobile-first usage.

| Breakpoint | Width | |------------|--------| | sm | 567px | | md | 768px | | lg | 992px | | xl | 1200px |

CSS Classes for Grid Column Containers

Column containers have the the following name convention:

col-[breakpoint]-[number of columns]-[column set size]

Examples:

col-sm-4-12
col-md-6-12
col-lg-8-12

(CSS class names can use simpler fractions by creating custom column sets.)

Building a Grid

Wrap a grid row within an element with a wg CSS class. The following grid contains two containers that are initially the width of the screen. When the md breakpoint is reached each container will be half the width of the screen.

<div class="wg">
  <div class="col-md-6-12">foo</div>
  <div class="col-md-6-12">bar</div>
</div>

The grid uses standard CSS floats and drops so multiple rows can be created in an element within a wg class. Just make sure that all containers span columns gracefully to avoid float drops.

<div class="wg">
  <div class="col-md-6-12">foo</div>
  <div class="col-md-6-12">bar</div>
  <div class="col-md-10-12">foo</div>
  <div class="col-md-2-12">bar</div>
</div>

Multiple col- classes can be used for behavior at multiple breakpoints.

<div class="wg">
  <div class="col-sm-4-12 col-md-6-12 col-lg-2-12">foo</div>
  <div class="col-sm-8-12 col-md-6-12 col-lg-10-12">foo</div>
</div>

Customization

Breakpoints

Default breakpoints are listed in src/_config.scss. They may be changed to different sizes and unit types.

$breakpoints: (
	sm : 567px,
	md : 768px,
	lg : 992px,
	xl : 1200px,
);

If you add or change the name of a breakpoint, be sure to use that name in your column class. For example if you add an xxl breakpoint you'll want to use class names like col-xxl-6-12.

Column Sets

Change the number of grid columns used in src/wee-grid.scss. By default a 12-column grid is built but as per the commented examples, multiple column sets can be defined and used at once. Each column set is created from a Sass mixin. You can create new column sets using any positive integer.

// --------- Specify Column Set(s) ---------- //
//
// Multiple columnsets may be used.
//
// @include column-set(2);
// @include column-set(4);
// @include column-set(6);
// @include column-set(8);
@include column-set(12);
// @include column-set(16);

By enabling the @include column-set(2) column set we can use simpler, more intuitive class names. Instead of using the col-md-6-12 CSS class, we'd use simpler fractions.

<div class="wg">
  <div class="col-md-1-2">foo</div>
  <div class="col-md-1-2">bar</div>
</div>

Contributing

Contributions are welcome. Remember that wee-grid wants to stay as simple as possible. It wants to be a grid, not a responsive framework. :-)

  1. Fork this repository (https://github.com/ecarlisle/wee-grid/fork).
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Here is some new awesomeness!')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request