In this two-part tutorial – published Nov. 28 and Dec. 14, 2018, respectively – TutsPlus instructor David Gwyer breaks down exactly how to go about giving blocks the exact style you’re looking for.
- Part I: Overview of support for block styles in several core blocks
- Part I: Introduction to how to go about registering new block styles, including basic code examples (see Part II for implementation)
- Part I: Gotchas around overriding block styles in the editor
- Part II largely covers implementation details, many parts with code
- Part II: Tips for creating a basic block to style (with create-guten-block)
- Part II: Working with editor-only or editor + front end stylesheets
- Part II: Registering custom CSS against block styles
- Part II: Gotchas of working with block style defaults
- Part II: Registering block styles in plugins and themes and understanding logistical challenges with those approache
This two-part series comprehensively covers the ins, outs, and gotchas of working with the block styles API in WordPress 5.0+. The fact that it’s published on TutsPlus gives it some authority and weight, and David does an excellent job of breaking down complex topics into bite-sized pieces.
For anyone looking to better tailor their writing and reading experience on their block-enabled site, this two-part guide provides an excellent foundation upon which to realize that experience.