The CSS flex shorthand property
The flex property is a shorthand for the greed, shrink, and size properties. The order of the shorthand properties is significant and is as follows: flex-grow, flex-shrink, flex-basis. Properties can be omitted from the end, in which case they will take the default value.
Rewrite the following code using the flex shorthand property:
.child {
flex-basis: 100px;
flex-grow: 1;
flex-shrink: 2;
}
Rewrite the following code using the flex shorthand property:
.child {
flex-shrink: 0.5;
flex-grow: 2;
}
Rewrite the following code using the flex shorthand property:
.child {
flex-shrink: 0.5;
flex-grow: 1;
}
Rewrite the following code using shorthand properties:
.child {
flex: 1 2 200px;
}
Rewrite the following code using shorthand properties:
.child {
flex: 2 0.7;
}
Rewrite the following code using shorthand properties:
.child {
flex: 3;
}