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 [3](https://github.com/philipwalton/flexbugs#3-min-height-on-a-column-flex-container-wont-apply-to-its-flex-items)
|
5 | ### Input
|
6 |
|
7 | ```css
|
8 | div {
|
9 | display: flex;
|
10 | min-height: 50vh;
|
11 | }
|
12 | ```
|
13 |
|
14 | ### Output
|
15 |
|
16 | ```css
|
17 | div {
|
18 | display: flex;
|
19 | height: 50vh;
|
20 | }
|
21 | ```
|
22 |
|
23 | ## bug [4](https://github.com/philipwalton/flexbugs/blob/master/README.md#4-flex-shorthand-declarations-with-unitless-flex-basis-values-are-ignored)
|
24 | ### Input
|
25 |
|
26 | ```css
|
27 | .foo {
|
28 | flex: 1 1 0;
|
29 | }
|
30 | ```
|
31 |
|
32 | ### Output
|
33 |
|
34 | ```css
|
35 | .foo {
|
36 | flex: 1 1 0%;
|
37 | }
|
38 | ```
|
39 |
|
40 | ## bug [6](https://github.com/philipwalton/flexbugs/blob/master/README.md#6-the-default-flex-value-has-changed)
|
41 | ### Input
|
42 |
|
43 | ```css
|
44 | .foo {
|
45 | flex: 1;
|
46 | }
|
47 | ```
|
48 |
|
49 | ### Output
|
50 |
|
51 | ```css
|
52 | .foo {
|
53 | flex: 1 1 0%;
|
54 | }
|
55 | ```
|
56 |
|
57 | ## bug [7](https://github.com/philipwalton/flexbugs#7-flex-basis-doesnt-account-for-box-sizingborder-box)
|
58 | ### Input
|
59 |
|
60 | ```css
|
61 | div {
|
62 | box-sizing: border-box;
|
63 | flex: 0 0 100%;
|
64 | }
|
65 | ```
|
66 |
|
67 | ### Output
|
68 |
|
69 | ```css
|
70 | div {
|
71 | box-sizing: border-box;
|
72 | flex: 0 0 auto;
|
73 | width: 100%;
|
74 | }
|
75 | ```
|
76 |
|
77 | ## bug [8.1.a](https://github.com/philipwalton/flexbugs/blob/master/README.md#8-flex-basis-doesnt-support-calc)
|
78 | ### Input
|
79 |
|
80 | ```css
|
81 | .foo {
|
82 | flex: 1 1 calc(1px);
|
83 | }
|
84 | ```
|
85 |
|
86 | ### Output
|
87 |
|
88 | ```css
|
89 | .foo {
|
90 | flex-grow: 1;
|
91 | flex-shrink: 0;
|
92 | flex-basis: calc(1px);
|
93 | }
|
94 | ```
|
95 |
|
96 | ## Usage
|
97 |
|
98 | ```js
|
99 | postcss([require('postcss-flexbugs-fixes')]);
|
100 | ```
|
101 |
|
102 | See [PostCSS] docs for examples for your environment.
|
103 |
|
104 | [postcss]: https://github.com/postcss/postcss
|
105 | [ci-img]: https://travis-ci.org/luisrudge/postcss-flexbugs-fixes.svg
|
106 | [ci]: https://travis-ci.org/luisrudge/postcss-flexbugs-fixes
|