enhance(theme): Add theme support for custom-units

This commit is contained in:
Brandon
2021-01-14 23:09:05 -06:00
parent 96974bf20a
commit efbb13f282

View File

@@ -85,6 +85,12 @@ add_action('after_setup_theme', function () {
*/ */
add_theme_support('editor-font-sizes', []); add_theme_support('editor-font-sizes', []);
/**
* Register relative length units in the editor.
* @link https://developer.wordpress.org/block-editor/developers/themes/theme-support/#support-custom-units
*/
add_theme_support('custom-units', 'rem', 'vw');
/** /**
* Disable custom colors in the editor. * Disable custom colors in the editor.
* @link https://developer.wordpress.org/block-editor/developers/themes/theme-support/#disabling-custom-colors-in-block-color-palettes * @link https://developer.wordpress.org/block-editor/developers/themes/theme-support/#disabling-custom-colors-in-block-color-palettes