However, in practice on Chrome and Firefox it only took 10% of the extra space.
This is correct behaviour.
Find the ratio of the item’s flex grow factor to the sum of the flex grow factors of all unfrozen items on the line. Set the item’s target main size to its flex base size plus a fraction of the remaining free space proportional to the ratio. flexbox-ref
From the above, the flex-grow
value effectively indicates the percentage of the free space, and flex-grow: 1
represents 100% of the free space. Also, the size after flex-grow
is added is derived by such an equation.
flex item's base size + (remaining free space * (flex item's flex factors / unfrozen flex item's flex factors))
If you specify 0.1 for flex-grow
in the context of the question, remaining free space will be 0.1 times the initial free space:
If the sum of the unfrozen flex items’ flex factors is less than one, multiply the initial free space by this sum. If the magnitude of this value is less than the magnitude of the remaining free space, use this as the remaining free space. flexbox-ref
So, using the above formula, the size of the third flex item can be derived as follows:
flex item's base size + (initial free space * 0.1 * (0.1 / 0.1))
= flex item's base size + (initial free space * 0.1)
So the result of flex-grow: 0.1
is 10% of the initial remaining free space.