PostCSS plugin that tries to fix all of flexbug's issues
JavaScript
Latest commit a9ec5ce Jan 10, 2017 @luisrudge committed on GitHub adding more info to the bug6
Permalink
Failed to load latest commit information.
bugs fix #29 Dec 6, 2016
specs fix #29 Dec 6, 2016
.eslintrc initial commit Jun 10, 2015
.gitignore initial commit Jun 10, 2015
.npmignore initial commit Jun 10, 2015
.travis.yml fix #29 Dec 6, 2016
CHANGELOG.md fix #29 Dec 6, 2016
LICENSE initial commit Jun 10, 2015
README.md adding more info to the bug6 Jan 10, 2017
gulpfile.js renaming things to allow adding more fixes Jun 20, 2015
index.js fix #29 Dec 6, 2016
package.json fix #29 Dec 6, 2016

README.md

PostCSS Flexbugs Fixes Build Status

PostCSS plugin This project tries to fix all of flexbug's issues.

bug 4

Input

.foo { flex: 1; }
.bar { flex: 1 1; }
.foz { flex: 1 1 0; }
.baz { flex: 1 1 0px; }

Output

.foo { flex: 1 1 0%; }
.bar { flex: 1 1 0%; }
.foz { flex: 1 1 0%; }
.baz { flex: 1 1 0%; }

bug 6

Input

.foo { flex: 1; }

Output

.foo { flex: 1 1 0%; }

This only fixes css classes that have the flex property set. To fix elements that are contained inside a flexbox container, use this global rule:

* {
    flex-shrink: 1;
}

bug 8.1.a

Input

.foo { flex: 1 0 calc(1vw - 1px); }

Output

.foo {
  flex-grow: 1;
  flex-shrink: 0;
  flex-basis: calc(1vw - 1px);
}

Usage

postcss([require('postcss-flexbugs-fixes')]);

See PostCSS docs for examples for your environment.