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

zebra-scss

v7.2.0

Published

A customizable CSS grid system based on the BEM methodology

Downloads

7

Readme

GitHub version npm version Contributions welcome

Zebra - a customizable CSS grid system

Just like a Zebra's stripes, every website is unique, and so we've created a grid system that can be tailored to your own individual project requirements.

What is Zebra?

Zebra is a customizable CSS grid system that aims to make it easier for developers to create custom layouts. By default, Zebra comes precompiled so that you can get up and running with our base grid in a matter of minutes. Or for developers with more specific needs, there are currently over 30 Scss variables that can be modified to tailor the output CSS to your exact requirements.

Zebra's class naming structure draws largely from the BEM methodology, but with some differences to help suit a grid system rather than individual components. You can check the wiki for full documentation on the classes available, but for now, here is an example of how to create columns using the default output:

<div class="row">
   <div class="col--3-12">This column spans 3/12ths</div>
   <div class="col--6-12">This column spans 6/12ths</div>
   <div class="col--3-12"This column spans 3/12ths></div>
</div>

This is just a very basic example, but it gives an overview of the core parts of the grid system: rows and columns. As with most grids, columns must always be nested within rows. There are two reasons for this, firstly it helps keep your DOM structured and consistent, and secondly, the row class contains some vital properties needed for columns to work.

Once you have a row, you can easily add columns within. Simply add elements and follow the class naming structure of col--X-Y, where X is the column span and Y is the total number of columns available (by default, Zebra offers 5, 8 and 12 as values for the total columns). Here you can see the influence of BEM, with .col being the base styling for a column, and --X-Y modifying the width. However, where a typical example of BEM would require both .col and .col--X-Y to be added to an element, Zebra combines the classes into one. This is because there should always be a width set on a column, meaning that there would never be an isntance of .col being used without a width modifier.

This is just a very brief introduction of how to use Zebra, but there are many more features available such as responsive columns, spacer classes, grids and guttering, and more. For full documentation on what Zebra can do, take a look at the wiki page.

Get Zebra

Install with npm:

npm i zebra-scss -s

Next, either include the /dist/css/zebra.css file in your <head>, or copy the files from the /src/sass folder into your Scss project to take advantage of Zebra's customization options.

<!-- Add a link to Zebra to your head -->
<link rel="stylesheet" type="text/css" href="/css/zebra.css">
 
<!-- OR copy the files within /src/sass into your Scss project and add this to your site.scss -->
@import '/src/sass/_zebra'

Remember to update the file paths to match your project structure.

Authors and Contributing

Contributions, either in code or constructive feedback, are welcome.

Authors

Sam Willis