Block support: Units

This document is part of the WordPress block reference and is intended for developers.

Block supports are a set of options that enables or disables block controls in the editor. Block supports are added to the block’s block.json file during block development (Not to be confused with theme.json which is used in theme development).

Documentation

The units block support is intended to decide which units that should be available in certain block controls.

✋ At the time of writing this, in January 28, 2023, I am unable to make it work with the core blocks that enable it; the social icons, navigation block, and the gallery.
If you have any more information about this block support, please let me know.

You can enable spacing units in your theme.json file to override the units in the spacing controls (margin, padding, and block gap).


View blocks per attribute or block support: