项目作者: jackmcpickle

项目描述 :
A simple yet flexible sass class naming structure on top of a flexbox based grid
高级语言: SCSS
项目地址: git://github.com/jackmcpickle/flex_e_ble.git
创建时间: 2016-02-09T12:35:10Z
项目社区:https://github.com/jackmcpickle/flex_e_ble

开源协议:

下载


flex_e_ble

NPM

Build Status Dev Dependencies Total Downloads renovate-app badge

A simple yet flexible class naming structure on top of a flex based grid.

Flexeble 2.0 removes support for < IE 11 and as such all fall backs and flexbox namespacing

Reasons

  • Can assist you in migrating your current Bootstrap and Foundation grids to flexbox as a drop in replacement.
  • Use a grid system that is the same across your projects but adapts to the naming conventions that your are used to.

See the website flexeble.space for demo examples

See all customisable variables

Requirements

Install

  • npm install flex_e_ble or copy dist/_flex_e_ble.scss

How it works

Flex_e_ble was originally based on purecss.io grid work.

Row css looks like

  1. .row {
  2. display: flex;
  3. flex-flow: row wrap;
  4. position: relative;
  5. }

Grid css looks like

  1. [class*=grid-] {
  2. display: inline-block;
  3. }

Usage

A basic grid class structure is a follows .$global-name-space-$grid-name-$breakpointsize-$columnindex

Make a simple 5 column grid with 30px gutters either side

  1. @import 'flex_e_ble';
  2. $total-columns: 5;
  3. $column-gutter: 30px;
  4. $auto-column-gutters: true;

Will output the grid as follows

  1. .grid-1 { width: 20%; }
  2. .grid-2 { width: 40%; }
  3. /*...etc... */

Want a Bootstrap class structure?

  1. @import 'flex_e_ble'
  2. // Bootstrap like
  3. $grid-name: 'col-';
  4. $base-grid-name: 'xs';
  5. $column-gutter: 15px;
  6. $auto-column-gutters: true;
  7. $right-name: 'push';
  8. $left-name: 'pull';
  9. $breakpoints: (
  10. 'sm': 480px,
  11. 'md': 768px,
  12. 'lg': 1024px,
  13. 'xl': 1180px
  14. );

Outputs a grid using the bootstrap naming convention

  1. .col-xs-1 { width: 8.33333%; }
  2. .col-xs-2 { width: 16.66667%; }
  3. /*...etc... */

Want a Foundation class structure?

  1. @import 'flex_e_ble';
  2. // foundation like;
  3. $column-gutter: 0.9375rem;
  4. $auto-column-gutters: false;
  5. $independant-grid-name: 'column';
  6. $grid-name: '';
  7. $base-grid-name: 'small';
  8. $breakpoints: (
  9. 'medium': 768px,
  10. 'large': 1024px
  11. );

Will output our grid as follows

  1. .small-1 { width: 8.33333%; }
  2. .small-2 { width: 16.66667%; }
  3. /*...etc... */

But remember underneath the properties outputted are just the same.