What is the difference between this two styles:
.style1 {
flex-shrink: 0;
}
.style2 {
flex-grow: 1;
}
If I'm setting the flex-grow to 1, it means that the element can't shrink, and vice-versa, right?
Thank you.
What is the difference between this two styles:
.style1 {
flex-shrink: 0;
}
.style2 {
flex-grow: 1;
}
If I'm setting the flex-grow to 1, it means that the element can't shrink, and vice-versa, right?
Thank you.
setting ‘flex-grow: 1’ is default value which will allow an element to increase width evenly.
Setting ‘flex-shrink: 0 ‘ means that element width can be reduced if other siblings have greater width.
Good read on: https://css-tricks.com/snippets/css/a-guide-to-flexbox/