B
B
Beetle2019-08-19 13:43:05
css
Beetle, 2019-08-19 13:43:05

Why do we need flex-shrink and flex-grow if we have percentage width and min-width?

Why do we need flex-shrink and flex-grow if we have percentage width and min-width?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
F
Flying, 2019-08-19
@Jukk

flex-shrinkand flex-groware not directly related to the size of the element in the sense that they do not directly determine the size (there is a flex-basis). These properties determine the behavior of an element when shrinking (shrink) and expanding (grow).
Those. if the value of these properties is non-zero, then the element is allowed to shrink / expand, moreover, with a coefficient determined by the value of these properties. If the value is zero, the corresponding change is prohibited.
You can read more details, for example, on MDN ( one , two )

B
Brad9aga, 2019-08-19
@Brad9aga

flex-shrink and flex-grow
in short, they work both horizontally and vertically

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question