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

bootstrap-grid-flexbox

v1.1.2

Published

Plugins flexbox grid system for bootstrap 3

Downloads

4

Readme

Bootstrap Grid Flexbox Build Status

Plugins flexbox grid system for bootstrap 3.

Story Behind

Before that when I developing a website with Bootstrap sometimes I get crazy because the difference height of grid can destroying my layout, so I want to moving to use Flexbox because most modern browser now can support Flexbox (check here) .

I choose to style the grid not to overide Bootstrap grid but just for add on to Bootstrap or as Plugins. Why? Sometimes I still need bootstrap grid, so i chose to not replace bootstrap grid.

Quick start

Several quick start options are available:

What's included

Within the download you'll find the following directories and files, logically grouping common assets and providing both compiled and minified variations. You'll see something like this:

bootstrap-grid-flexbox/
├──  dist/
│   └── css/
│         ├── bootstrap-grid-flexbox.css
│         └── bootstrap-grid-flexbox.min.css
├── less/
│   ├── bootstrap-grid-flexbox.less
│   ├── grid.less
│   ├── mixins.less
│   └── variables.less
└── sass/
    ├── bootstrap-grid-flexbox.scss
    ├── _grid.scss
    ├── _mixins.scss
    └── _variables.scss

The dist directory is for compiled css, and you can use that, but if you want build you can use file in less directory and compile the bootstrap-grid-flexbox.less or sass directory and compile the bootstrap-grid-flexbox.scss

Bugs and feature requests

Have a bug or a feature request? Please first search for existing and closed issues. If your problem or idea is not addressed yet, please open a new issue.

Documentation

The documentation is not ready yet.

Usage

Add the css after the Bootstrap css

<head>
    <!-- Bootstrap -->
    <link href="css/bootstrap.min.css" rel="stylesheet">
    
    <!-- Bootstrap Grid Flexbox -->
    <link href="css/bootstrap-grid-flexbox.min.css" rel="stylesheet">
</head>

After that basically you just can use the class for row and col.

Is this just for bootstrap? Hell No. You can still using the grid without bootstrap. But you still need create your own container

Basically using the grid and row is the same as bootstrap at here, you can use offset pull push and responsive grid like xs sm md lg at here.

But I replace row and col with my class preference to avoid overide bootstrap row and grid. To use you just replace the .row with .row-flex and .col- with .col-flex-

Example:

<div class="row-flex">
    <div class="col-flex-md-12">.col-flex-md-12</div>
    <div class="col-flex-md-2">.col-flex-md-2</div>
    <div class="col-flex-md-10">.col-flex-md-10</div>
    <div class="col-flex-md-4">col-flex-md-4</div>
    <div class="col-flex-md-8">.col-flex-md-8</div>
    <div class="col-flex-md-6">.col-flex-md-6</div>
    <div class="col-flex-md-6">.col-flex-md-6</div>
</div>

Offset:

<div class="row-flex">
    <div class="col-flex-md-2 col-flex-md-offset-10">.col-flex-md-2</div> 
    <div class="col-flex-md-4 col-flex-md-offset-8">.col-flex-md-4</div> 
    <div class="col-flex-md-6 col-flex-md-offset-6">.col-flex-md-6</div> 
    <div class="col-flex-md-8 col-flex-md-offset-4">.col-flex-md-8</div> 
    <div class="col-flex-md-10 col-flex-md-offset-2">.col-flex-md-10</div> 
    <div class="col-flex-md-12 col-flex-md-offset-0">.col-flex-md-12</div> 
</div>

Nested:

<div class="row-flex"> 
  <div class="col-flex-md-12"> .col-flex-md-12 
    <div class="row-flex"> 
      <div class="col-flex-md-2">.col-flex-md-2</div> 
      <div class="col-flex-md-10"> .col-flex-md-10 
        <div class="row-flex"> 
          <div class="col-flex-md-6">.col-flex-md-6</div> 
          <div class="col-flex-md-6">.col-flex-md-6</div> 
        </div> 
      </div> 
    </div>
  </div> 
</div>

Improvement

Using flexbox we can improve the grid system.

Aligment Grid

I add classes to align elements to the start or end of a row as well as the top, bottom, or center of a column. And it be like this.

.start-

<div class="row-flex start-xs">
    <div class="col-flex-xs-6">
        .col-flex-xs-6
    </div>
</div>

.center-

<div class="row-flex center-xs">
    <div class="col-flex-xs-6">
        .col-flex-xs-6
    </div>
</div>

.end-

<div class="row-flex end-xs">
    <div class="col-flex-xs-6">
        .col-flex-xs-6
    </div>
</div>

.top-

<div class="row-flex top-xs">
    <div class="col-flex-xs-6">
        .col-flex-xs-6<br>.col-flex-xs-6
    </div>
    <div class="col-flex-xs-6">
        .col-flex-xs-6
    </div>
</div>

.middle-

<div class="row-flex middle-xs">
    <div class="col-flex-xs-6">
        .col-flex-xs-6<br>.col-flex-xs-6
    </div>
    <div class="col-flex-xs-6">
        .col-flex-xs-6
    </div>
</div>

.bottom-

<div class="row-flex bottom-xs">
    <div class="col-flex-xs-6">
        .col-flex-xs-6<br>.col-flex-xs-6
    </div>
    <div class="col-flex-xs-6">
        .col-flex-xs-6
    </div>
</div>

As you see you can add xs md lg to the aligment

Reverse Grid

You can reverse the order of grid

.reverse

<div class="row-flex reverse">
    <div class="col-flex-xs-4">
        1
    </div>
    <div class="col-flex-xs-4">
        2
    </div>
    <div class="col-flex-xs-4">
        3
    </div>
</div>

And because the reverse the grid order will be 3 - 2 - 1. The .reverse class must use with the .row-flex.

BUILD

I use Grunt to build

  1. Install Node.js download

  2. Install Gruntjs

    npm install -g grunt-cli
  3. Install package

    npm install
  4. Run build process

    grunt dist

Inspired

Creators

Rizky Kharisma

License

Code release under the MIT license