5. Styles: CSS Architecture and Style Variations
This lesson combines two related topics: how the scaffold organizes and code-splits CSS, and how style variations give editors controlled design choices.
Learning Outcomes
- Understand the autoenqueue pipeline:
assets/css/blocks/{namespace}/{block-name}.cssloads only when the block is present. - Know the difference between block CSS, component CSS, and base CSS.
- Know what style variations are (
styles/{block-type}/{slug}.json) and how they differ from JS-registered block styles. - Be able to create a style variation and a code-split block stylesheet.