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

flex-grid-system-maker-mixin

v1.1.1

Published

Generate flex grid system as you preferred in breakpoint, className, gap with minimum size, that will generate grid system only ones you demand

Downloads

8

Readme

Flexbox Grid system maker

This is a modern SCSS mixin based on Flexbox.

Quick install

This is constantly in development! Try it out now: You can generate grid system based on flexbox as you prefer.

  • free in naming className
  • free in columns per breakpoint
  • free in various columns system per breakpoint
  • free in adding breakpoints
  • free in gap between columns
  • honestly if you are senior you are able to utilize all mixins as you prefer for your project

NPM

npm install flex-grid-system-maker-mixin

or

Yarn

yarn add flex-grid-system-maker-mixin

Import

After installation, you can make simple grid-system with this snap shot:

@import 'flex-grid-system-maker-mixin/scss/flexbox-grid-system-maker-mixin'

$breakpointSm: 576px;
$breakpointMd: 768px;
$breakpointLg: 992px;
$breakpointXl: 1140px;

@include makeFlexRow(b-row);
@include makeFlexCols(col-, 12);

@include makeFlexGap(b-row, 10px, 10px);

@include makeFlexHelpers(flex-);
@include makeJustifyAlignHelpers();

// this should be after above so we can make it high priority than befores
@include media-breakpoint-up($breakpointSm) {
  @include makeFlexCols(sm\:col-, 3, \/3);
  @include makeFlexCols(sm\:col-, 12);
}

// this should be after $breakpointSm so we can make it high priority than befores
@include media-breakpoint-up($breakpointMd) {
  @include makeFlexCols(md\:col-, 12);
  @include makeFlexCols(md\:col-, 5, \/5);
  @include makeFlexGap(b-row, 30px, 30px);
  @include makeFlexHelpers(md\:flex-);
  @include makeJustifyAlignHelpers(md\:);
}

// this should be after $breakpointMm so we can make it high priority than befores
@include media-breakpoint-up($breakpointLg) {
  @include makeFlexCols(lg\:col-, 12);
}

// this should be after $breakpointLg so we can make it high priority than befores
@include media-breakpoint-up($breakpointXl) {
  @include makeFlexCols(xl\:col-, 12);
}

// these should be at the bottom so we can make it high priority than befores
@include makeFlexGap(small-gap, 10px, 10px);
@include makeFlexGap(no-gap, 0, 0);

make Row


// makeFlexRow(b-row);

@include makeFlexRow(b-row);

// now we can use <div class="b-row">...</div>

make Columns


// @include makeFlexCols(<classNamePrefix>, <columns>, <classNameSuffix>);
// className will generated as <classNamePrefix><col><classNameSuffix>

@include makeFlexCols(col-, 5, \/5);

/* now we can use 
    <div class="b-row">
        <div class="col-2/5">2/5</div>
        <div class="col-3/5">3/5</div>
    </div>
*/

make gap between cols


// @include makeFlexGap(<className>, <gapX>, <gapY>);
// 

@include makeFlexGap(b-row, 20px, 20px);

/* now the cols inside b-row will be spaced 30px 
    <div class="b-row">
        <div class="col-2/5">2/5</div>
        <div class="col-3/5">3/5</div>
    </div>
*/

make helpers

// @include makeFlexHelpers(<classPrefix>);
// @include makeJustifyAlignHelpers(<classPrefix>);

@include makeFlexHelpers(flex-);
@include makeJustifyAlignHelpers(b-);

/*  now we can use as
    <div class="b-row b-just-center b-align-center">
        <div class="col-1/5 flex-grow flex-order-1">2/5</div>
        <div class="col-2/5 flex-order-0">3/5</div>
    </div>
*/

make breakpoint


/* media-breakpoint-up(<minWidth>) */

@include media-breakpoint-up(768px) {

  @include makeFlexCols(md\:col-, 12);
  @include makeFlexCols(md\:col-, 5, \/5);

  @include makeFlexGap(b-row, 30px, 30px);

  @include makeFlexHelpers(md\:flex-);
  @include makeJustifyAlignHelpers(md\:);
}

Feel free to customize.

CSS only

This is a SCSS mixin for make grid system as you prefer.

There is no JavaScript included. People generally want to use their own JS implementation (and usually already have one). This can be considered "environment agnostic": it's just the style layer on top of the logic.

Browser Support

This uses autoprefixer to make (most) Flexbox features compatible with earlier browser versions. According to Can I use, This is compatible with recent versions of:

  • Chrome
  • Edge
  • Firefox
  • Opera
  • Safari

Internet Explorer (10+) is only partially supported.