- Register: Add entries in
inc/hooks/register-block-styles.php(name + label). - Core overrides: Add SCSS in
assets/scss/blocks/core/with filename matching block name. Auto-enqueued; do not import into mainindex.scss. Thennpm run build. - Third-party overrides: Add SCSS in
assets/scss/blocks/third-party/named by block slug (e.g.test.scssforwdsbt/test). Auto-enqueued; do not import. Thennpm run build.
- Create a JS file in
assets/js/block-variations/. - Import it in
assets/js/block-variations/index.js. - Use
wp.blocks.registerBlockVariation('core/paragraph', { name, title, attributes, ... }). Block names: checkwp.blocks.getBlockTypes()in the editor console.
Edit assets/js/editor.js: set unusedBlocks, unregisterBlockVariations, and keepEmbeds (for core/embed). Unused blocks and variations are unregistered; only listed embed variations are kept.
- Responsive:
assets/scss/abstracts/responsive-mixins.scss—@include responsive-mixins.responsive-min(600px),responsive-max(600px),responsive-range(600px, 1200px). - Mobile only:
assets/scss/abstracts/mobile-only-mixins.scss—@include mobile-only-mixins.mobile-onlyto hide on desktop and show on mobile (a11y-friendly).