Summary
Allow choosing a different color scheme for an individual code block, overriding the global setting.
Details
- New
colorScheme attribute with a SelectControl in InspectorControls (default: inherit global).
Styles_Handler::enqueue_assets() must enqueue each theme CSS used on the page and scope it — either by wrapping per-theme CSS under a .wzcbh-theme-{slug} class at build time (extend build-prism.js) or via inline scoped styles.
- Editor canvas preview should reflect the per-block theme where feasible.
- Applies identically in client and server modes since both use the same Prism theme CSS.
Why
Useful for showcasing themes, differentiating terminal output vs code, or matching different post designs. Enlighter offers per-block theming and it's a popular capability.
Speed to implement: Fast · Usefulness: Medium · Rank: 6
Summary
Allow choosing a different color scheme for an individual code block, overriding the global setting.
Details
colorSchemeattribute with a SelectControl in InspectorControls (default: inherit global).Styles_Handler::enqueue_assets()must enqueue each theme CSS used on the page and scope it — either by wrapping per-theme CSS under a.wzcbh-theme-{slug}class at build time (extendbuild-prism.js) or via inline scoped styles.Why
Useful for showcasing themes, differentiating terminal output vs code, or matching different post designs. Enlighter offers per-block theming and it's a popular capability.
Speed to implement: Fast · Usefulness: Medium · Rank: 6