From 981678ba36fe9fed9edfa37f9991004002b80645 Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Fri, 14 Dec 2018 01:20:12 +0000 Subject: [PATCH] Block Editor: Add extra body classes when the block editor is loaded. Merges [43780] from the 5.0 branch to trunk. See #45037. git-svn-id: https://develop.svn.wordpress.org/trunk@44133 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/admin-header.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/wp-admin/admin-header.php b/src/wp-admin/admin-header.php index 30c9e89d08..f00fab9bce 100644 --- a/src/wp-admin/admin-header.php +++ b/src/wp-admin/admin-header.php @@ -186,6 +186,15 @@ if ( is_network_admin() ) { $admin_body_class .= ' no-customize-support no-svg'; +if ( $current_screen->is_block_editor() ) { + // Default to is-fullscreen-mode to avoid jumps in the UI. + $admin_body_class .= ' block-editor-page is-fullscreen-mode wp-embed-responsive'; + + if ( current_theme_supports( 'editor-styles' ) && current_theme_supports( 'dark-editor-style' ) ) { + $admin_body_class .= ' is-dark-theme'; + } +} + ?>