From 433dfae50993d6512f5cd89646e98612208c3656 Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Mon, 22 Oct 2018 03:14:40 +0000 Subject: [PATCH] Block Editor: Add extra body classes when the block editor is loaded. See #45037. Built from https://develop.svn.wordpress.org/branches/5.0@43780 git-svn-id: http://core.svn.wordpress.org/branches/5.0@43609 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/admin-header.php | 9 +++++++++ wp-includes/version.php | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/wp-admin/admin-header.php b/wp-admin/admin-header.php index d5ceeccd61..158be6297b 100644 --- a/wp-admin/admin-header.php +++ b/wp-admin/admin-header.php @@ -175,6 +175,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'; + } +} + ?>