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.

Задание 1

Rewrite the following code using the flex shorthand property:

css.child {
  flex-basis: 100px;
  flex-grow: 1;
  flex-shrink: 2;
}
Задание 2

Rewrite the following code using the flex shorthand property:

css.child {
  flex-shrink: 0.5;
  flex-grow: 2;
}
Задание 3

Rewrite the following code using the flex shorthand property:

css.child {
  flex-shrink: 0.5;
  flex-grow: 1;
}
Задание 4

Rewrite the following code using shorthand properties:

css.child {
  flex: 1 2 200px;
}
Задание 5

Rewrite the following code using shorthand properties:

css.child {
  flex: 2 0.7;
}
Задание 6

Rewrite the following code using shorthand properties:

css.child {
  flex: 3;
}