Optimal flexible box layout algorithm
问题 I'm implementing the CSS3 flexible box layout module as defined by the W3C, which is similar to Mozilla's box model for xul. While these standards specify how the model should behave, they don't give any details on how they should be implemented. The parts of the model I'm interested in are: Boxes have a width and height. Boxes can contain other boxes. Container boxes (parent boxes) are responsible for sizing and positioning the boxes they contain (child boxes). Boxes have orientation which