concept
flex-percentage-basis — CSS reference
Percentage bases use the container’s inner main size. When that size is indefinite the used percentage basis is content, whereas a zero length remains definite. This can affect column flex containers with auto height.
Formal Syntax & Structure
css syntaxcss
flex-basis: 0%; /* compare 0px */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}#p{flex-direction:column;width:200px}#p>*{height:auto;min-height:0;flex-grow:0;flex-shrink:0}#a{flex-basis:0%}#b{flex-basis:0px}</style><body><div id="p"><div id="a"><div style="height:40px">Content</div></div><div id="b"><div style="height:40px">Content</div></div></div></body></html>