I have also examined various documents but could not understand the logic in the code below. Let's say we gave 25% for Flex-Basis. As you can see when we give Flex-Grow 0.25 to the other box with the same features, the dimensions are different, but shouldn't it be the same?
Also, what is the difference between using the flex basis as a percentage and using flexible growth? Thank you very much for your interest in advance.
html body {
box-sizing: border-box;
margin: 0;
padding: 0;
}
.container {
width: 90%;
margin: 2em auto;
height: 35px;
display: flex;
background: rgb(51, 153, 73);
}
.box {
flex-basis: auto;
background: rgb(160, 166, 221);
}
.second {
flex-basis: 25%;
}
.third {
flex-grow: 0.25;
}
<div class="container">
<div class="box first">First Box</div>
</div>
<div class="container">
<div class="box second">Second Box</div>
</div>
<div class="container">
<div class="box third">Third Box</div>
</div>