concept

flex-partial-fill — CSS reference

If the sum of unfrozen factors is below one, the algorithm may limit remaining space using the initial free space times that sum. With no constraints and grow factors .2 and .3, only half the 200px surplus is consumed.

Formal Syntax & Structure

css syntaxcss
flex-grow: 0.2;

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>CSS flexible sizing lab</title><style>body {margin:0} .sample {background:#dcebe9;color:#182e32}#p{display:flex;width:300px;align-items:flex-start;background:#e6eef2} #p>*{box-sizing:content-box;min-width:0;height:30px;background:#128579;color:white} #b{background:#326c9d}#a{flex:.2 1 50px}#b{flex:.3 1 50px}</style><body><div id="p"><div id="a">A</div><div id="b">B</div></div></body></html>
CSS Reference