postcss-flexbugs-fixes
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/postcss-flexbugs-fixes package

5.0.2 • Public • Published

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; }
.bar { flex: 1 1; }
.foz { flex: 1 1; }
.baz { flex: 1 1; }

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')]);

You can also disable bugs individually, possible keys bug4, bug6 and bug8a.

var plugin = require('postcss-flexbugs-fixes');
postcss([plugin({ bug6: false })]);

See PostCSS docs for examples for your environment.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
5.0.24,016,369latest

Version History

VersionDownloads (Last 7 Days)Published
5.0.24,016,369
5.0.11,164
5.0.0566
4.2.12,793,738
4.2.083,500
4.1.0715,097
4.0.062
3.3.168,376
3.3.06,582
3.2.088,426
3.1.03
3.0.07,278
2.1.11,266
2.1.0124
2.0.010
1.1.03
1.0.06
0.0.53
0.0.44
0.0.36
0.0.26
0.0.14

Package Sidebar

Install

npm i postcss-flexbugs-fixes

Weekly Downloads

7,782,593

Version

5.0.2

License

MIT

Unpacked Size

8.43 kB

Total Files

8

Last publish

Collaborators

  • luisrudge