Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@webdev-tools/css-flex-layout

webdev-tools16MIT0.1.4

A tiny framework based on css flex box to manage grids without flood your html

css, flexgrid, flex-grid, flex-layout, grid

readme

css-flex-layout

A tiny framework based on css flex box to manage grids without flood your html

It is only necessary to add 1 class to the columns container. Keep your code slim and clean.

Usage:

Auto sized columns

Divide all available space between columns. If a column don't fit on the line, it will break to the next line.

<section class="fl-cols-container">
  <div>1</div>
  <div>2</div>
  <div>3</div>
</section>

Specific columns per line

Define the number of columns you want per line and available space will be divided to fit the columns on the line and the other columns will break to the next line.

Columns Class
2 .fl-2-cols-container
3 .fl-3-cols-container
4 .fl-4-cols-container
6 .fl-6-cols-container
<section class="fl-3-cols-container">
  <aside>001</aside>
  <aside>002</aside>
  <aside>003</aside><!-- break to next line -->
  <aside>004</aside>
  <aside>005</aside>
  <aside>006</aside><!-- break to next line -->
  <aside>007</aside><!-- alone on the last line -->
</section>

Gutters

Gutters add padding to the columns, without change its size.

Padding class
5px .fl-gutter-5 or .fl-gutter-tb-5 or .fl-gutter-rl-5
10px .fl-gutter-10 or .fl-gutter-tb-10 or .fl-gutter-rl-10
15px .fl-gutter-15 or .fl-gutter-tb-15 or .fl-gutter-rl-15
20px .fl-gutter-20 or .fl-gutter-tb-20 or .fl-gutter-rl-20

tb = Top and Bottom rl = Right and Left

<section class="fl-cols-container fl-gutter-5">
  <div>1</div>
  <div>2</div>
  <div>3</div>
</section>

Spacers

Spacers add margin bottom to all columns, pushing the cells that fell to the next line.

Padding class
5px .fl-spacer-5
10px .fl-spacer-10
15px .fl-spacer-15
20px .fl-spacer-20
<section class="fl-2-cols-container fl-spacer-20">
  <aside>001</aside>
  <aside>002</aside><!-- break to next line -->
  <!-- 20px spacer between  -->
  <aside>003</aside>
  <aside>004</aside>
</section>

changelog

0.1.4 (2018-05-27)

  • 0.1.2 (28a88e3)
  • build: Removed semantic-version to user npm version instead (bb4382e)
  • build: Updated Husky git-hooks (cfca158)

0.1.2 (2018-05-27)

  • build: Removed semantic-version to user npm version instead (bb4382e)
  • build: Updated Husky git-hooks (cfca158)

0.1.3 (2018-05-27)

  • fix: Fix npm install (26917db)
  • fix: Fix remove scripts from package.json (38e4875)

0.1.2 (2018-05-27)

  • fix: Removing "scripts" property when publishing the package (c514a0a)
  • build: Removed duplicated stylelint on new version flow (f69b549)

0.1.1 (2018-05-27)

  • docs: Bump version to publish docs (d5e0f6c)
  • docs(docs): Added classes documentation and usage to README (74e664d)
  • ci: Added deploy script to travis-ci (6fae64e)
  • ci: Added skip_cleanup: true to avoid remove node_modules folder (b48f799)
  • ci: Initiated semantic release and conventional-commit (02f682e)
  • build: Enabled change-log generation when running npm version (b72e569)

0.1.0 (2018-05-27)

  • 0.1.0 (7405e7b)
  • Added build script and dependencies (9183fc1)
  • Added gutters (a1f54de)
  • Added spacer to push botton cells down (0e4cad3)
  • Created publish scripts (366db10)
  • Enhanced style-lint to use on SCSS files (6d344bb)
  • Implemented flex-grid core classes (d863d32)
  • Initial commit (d0906a7)
  • Migrated to SCSS (b7973a6)
  • Removed css var() to target IE 11 (cd511ef)
  • Removed normalize.css and colos (376065b)