From 97f3ab0f2a2b3499b52bdefd08e5c7f5f495cd80 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 11 Nov 2021 19:35:00 +0000 Subject: [PATCH] Twenty Twenty-One: Correct default image alignment in the editor. By default, the theme centers images on the front end when no alignment is selected. In the editor, however, images were aligned to the left side of the block. This commit ensures that the alignment in the editor matches the one on the front end. Props sabernhardt, ashfame, poena, annezazu. Fixes #53809. Built from https://develop.svn.wordpress.org/trunk@52142 git-svn-id: http://core.svn.wordpress.org/trunk@51734 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-content/themes/twentytwentyone/assets/css/ie-editor.css | 1 + wp-content/themes/twentytwentyone/assets/css/style-editor.css | 1 + .../twentytwentyone/assets/sass/05-blocks/image/_editor.scss | 1 + wp-includes/version.php | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-content/themes/twentytwentyone/assets/css/ie-editor.css b/wp-content/themes/twentytwentyone/assets/css/ie-editor.css index 9665360514..caaee11b38 100644 --- a/wp-content/themes/twentytwentyone/assets/css/ie-editor.css +++ b/wp-content/themes/twentytwentyone/assets/css/ie-editor.css @@ -1458,6 +1458,7 @@ h6 { } /* Center image block by default in the editor */ +.wp-block-image, .wp-block-image > div { text-align: center; } diff --git a/wp-content/themes/twentytwentyone/assets/css/style-editor.css b/wp-content/themes/twentytwentyone/assets/css/style-editor.css index b4ad479ad8..8f61bab00c 100644 --- a/wp-content/themes/twentytwentyone/assets/css/style-editor.css +++ b/wp-content/themes/twentytwentyone/assets/css/style-editor.css @@ -1127,6 +1127,7 @@ h6, } /* Center image block by default in the editor */ +.wp-block-image, .wp-block-image > div { text-align: center; } diff --git a/wp-content/themes/twentytwentyone/assets/sass/05-blocks/image/_editor.scss b/wp-content/themes/twentytwentyone/assets/sass/05-blocks/image/_editor.scss index e4ed9d7a01..dcbf6d3511 100644 --- a/wp-content/themes/twentytwentyone/assets/sass/05-blocks/image/_editor.scss +++ b/wp-content/themes/twentytwentyone/assets/sass/05-blocks/image/_editor.scss @@ -1,5 +1,6 @@ /* Center image block by default in the editor */ +.wp-block-image, .wp-block-image > div { text-align: center; } diff --git a/wp-includes/version.php b/wp-includes/version.php index bb665f9844..5bed646d4a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-alpha-52141'; +$wp_version = '5.9-alpha-52142'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.