Render Flow - Why nesting mirrors HTML structure
Read .container
→Create container block
Read .container .header
→Create nested header block inside container
Read .container .content
→Create nested content block inside container
Read .container .content p
→Create nested p block inside content
Apply styles from outer to inner blocks
Render styles in browser respecting nesting
The browser reads the HTML structure first, then the SASS nesting mirrors this structure by grouping styles inside parent selectors. This helps organize CSS rules that apply to nested HTML elements.