Render Flow - Why flexbox is needed
[Parse CSS] -> [Identify display:flex on container] -> [Convert children to flex items] -> [Calculate main and cross axes] -> [Apply flex properties (grow, shrink, basis)] -> [Arrange items along main axis] -> [Align items along cross axis] -> [Paint and Composite]
The browser reads CSS and sees display:flex on a container. It then treats the container's children as flexible items, calculates their sizes and positions along horizontal or vertical axes, and arranges them accordingly before painting.