UNPKG

1.25 kBMarkdownView Raw
1# PostCSS Flexbugs Fixes [![Build Status][ci-img]][ci]
2[PostCSS] plugin This project tries to fix all of [flexbug's](https://github.com/philipwalton/flexbugs) issues.
3
4## bug [4](https://github.com/philipwalton/flexbugs/blob/master/README.md#4-flex-shorthand-declarations-with-unitless-flex-basis-values-are-ignored)
5### Input
6
7```css
8.foo {
9 flex: 1 1 0;
10}
11```
12
13### Output
14
15```css
16.foo {
17 flex: 1 1 0%;
18}
19```
20
21## bug [6](https://github.com/philipwalton/flexbugs/blob/master/README.md#6-the-default-flex-value-has-changed)
22### Input
23
24```css
25.foo {
26 flex: 1;
27}
28```
29
30### Output
31
32```css
33.foo {
34 flex: 1 1 0%;
35}
36```
37
38## bug [8.1.a](https://github.com/philipwalton/flexbugs/blob/master/README.md#8-flex-basis-doesnt-support-calc)
39### Input
40
41```css
42.foo {
43 flex: 1 1 calc(1px);
44}
45```
46
47### Output
48
49```css
50.foo {
51 flex-grow: 1;
52 flex-shrink: 0;
53 flex-basis: calc(1px);
54}
55```
56
57## Usage
58
59```js
60postcss([require('postcss-flexbugs-fixes')]);
61```
62
63See [PostCSS] docs for examples for your environment.
64
65[postcss]: https://github.com/postcss/postcss
66[ci-img]: https://travis-ci.org/luisrudge/postcss-flexbugs-fixes.svg
67[ci]: https://travis-ci.org/luisrudge/postcss-flexbugs-fixes