CSS Rendering Engine (2/2)
...continued from CSS Rendering Engine (1/2)
Computing styles to match up with render tree nodes.
CSS Style rule tree is yet another tree created to help match styles with Render Tree nodes.
CSS Cascade rules determine how render tree nodes are lined up on the page.
The render tree nodes are laid out on the page (and potentially updated). If a user makes an incremental change to a render tree node, that node is marked as ‘dirty‘ and it will be re-layed out along with its children (similar to how the React Trees diff to only update altered components and their children!)
Elements are laid out, then their positions are fine-tuned, then painted.
How CSS affects HTML element positioning.
CSS Box types:
CSS element positioning - x, y, and z space