From efbb13f28240dc7584d9aa9ee3a2a11325ff9863 Mon Sep 17 00:00:00 2001 From: Brandon Date: Thu, 14 Jan 2021 23:09:05 -0600 Subject: [PATCH] enhance(theme): Add theme support for `custom-units` --- app/setup.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/setup.php b/app/setup.php index 3c1be25..d426cca 100755 --- a/app/setup.php +++ b/app/setup.php @@ -85,6 +85,12 @@ add_action('after_setup_theme', function () { */ 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. * @link https://developer.wordpress.org/block-editor/developers/themes/theme-support/#disabling-custom-colors-in-block-color-palettes