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

koality-flexbox-grid

v1.0.6

Published

Simple Flexbox Grid

Downloads

477

Readme

Koality Flexbox Grid

This aims to be a very simple Sass flexbox grid that isn't overly complicated or ends up being something you fight against while building.

How to use

You can get this project into like any node package: npm install koality-flexbox-grid

Then in your projects sass you will want to import it like @import node_modules/koality-flexbox-grid/src/scss/flexbox-grid`. In doing that you can override some variables.

Classes

Container Classes

  • flex-container: adding that class to any element simply applies a display: flex to it.
  • flex-wrap
  • flex-nowrap
  • flex-wrap-reverse
  • flex-row or flex-dir-row
  • flex-dir-row-reverse
  • flex-column or flex-dir-column
  • flex-dir-column-reverse
  • flex-jc-flex-start
  • flex-jc-flex-end
  • flex-jc-center
  • flex-jc-space-between
  • flex-jc-space-around
  • flex-jc-space-evenly
  • flex-ai-flex-start
  • flex-ai-flex-end
  • flex-ai-center
  • flex-ai-stretch
  • flex-ai-baseline
  • flex-ac-flex-start
  • flex-ac-flex-end
  • flex-ac-center
  • flex-ac-stretch
  • flex-ac-space-between
  • flex-ac-space-around
  • flex-as-flex-end
  • flex-as-center
  • flex-as-baseline
  • flex-as-stretch

Item Classes

  • By default all items are flex: 1 1 100%
  • To control the width of you item you have the class format of flex-X-X where you can put any number from 1-12. It should work like most common CSS frameworks where flex-2-3 will make this item 66%.
  • flex-shrink-0
  • flex-grow-0
  • flex-grow-2
  • flex-grow-3
  • flex-grow-4
  • flex-grow-5

Responsive Classes

All classes listed can be prefixed with any breakpoint name to make it work on that breakpoint and up.

Available Breakpoints

  • $default: 0
  • $sm: 576px
  • $md: 768px
  • $lg: 992px
  • $xl: 1200px
  • $breakpoints: ( default: $default, sm: $sm, md: $md, lg: $lg, xl: $xl, );

These can be overridden in your own project as long as you match the variable names. If you drop breakpoints from the $breakpoints sass map it will change the amount of breakpoints the Grid has, this will greatly reduce the amount of CSS the Grid uses.

Example: md-flex-dir-colmn, lg-flex-2-3

Row Classes

  • row: will center the row and make it $row-width (default 1400px) and on screens smaller than it's width it will have gutters the width of $gutter-width (default 15px)
  • row-full will be 100% width even able to break outside of a row and touch the edge of the screen
  • inner-row same as row but only $inner-row-width (default 800px)

Variables

As much as we can we try to allow things to be user overridable. Here are currently all the variables you can change.

  • $row-width: 1400px;
  • $inner-row-width: 800px;
  • $default: 0;
  • $sm: 576px;
  • $md: 768px;
  • $lg: 992px;
  • $xl: 1200px;
  • $breakpoints: ( default: $default, sm: $sm, md: $md, lg: $lg, xl: $xl, );
  • $gutter-width: 15px;
  • $flex-grid-count: 12; This will adjust the amount of columns in the grid.
  • $flex-grow-default: 0; This will change wheither or not the grid items grow by default or not.
  • $flex-shrink-default: 1; This will change wheither or not the grid items shrink by default or not.

Demo

See CodePen Example