From 1f47c2bcbff7eb74052045d9f18df0c341853428 Mon Sep 17 00:00:00 2001 From: audrasjb Date: Wed, 14 Sep 2022 10:48:11 +0000 Subject: [PATCH] Twenty Twenty: Ensure headings styles are consistent between editor and front-end. This changeset removes `.wp-block` container from headings CSS selectors to restore consistency between editor and front-end styles. It also removes `.wp-block` from headings selectors in the `'block-editor'` array of `twentytwenty_get_localized_font_family_elements()`. Props kajalgohel, kmadhak, poena, multidots1896, tahmidulkarim, audrasjb. Fixes #56194. Built from https://develop.svn.wordpress.org/trunk@54154 git-svn-id: http://core.svn.wordpress.org/trunk@53713 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../assets/css/editor-style-block-rtl.css | 75 +++++++++++-------- .../assets/css/editor-style-block.css | 75 +++++++++++-------- .../assets/css/editor-style-classic-rtl.css | 18 +++-- .../assets/css/editor-style-classic.css | 18 +++-- ...class-twentytwenty-non-latin-languages.php | 2 +- wp-includes/version.php | 2 +- 6 files changed, 114 insertions(+), 76 deletions(-) diff --git a/wp-content/themes/twentytwenty/assets/css/editor-style-block-rtl.css b/wp-content/themes/twentytwenty/assets/css/editor-style-block-rtl.css index b2f6de3acdef..ef0eb614fe15 100644 --- a/wp-content/themes/twentytwenty/assets/css/editor-style-block-rtl.css +++ b/wp-content/themes/twentytwenty/assets/css/editor-style-block-rtl.css @@ -121,12 +121,12 @@ Inter variable font. Usage: .editor-post-title__block .editor-post-title__input, .editor-styles-wrapper .wp-block-post-title, -.editor-styles-wrapper .wp-block h1, -.editor-styles-wrapper .wp-block h2, -.editor-styles-wrapper .wp-block h3, -.editor-styles-wrapper .wp-block h4, -.editor-styles-wrapper .wp-block h5, -.editor-styles-wrapper .wp-block h6, +.editor-styles-wrapper h1, +.editor-styles-wrapper h2, +.editor-styles-wrapper h3, +.editor-styles-wrapper h4, +.editor-styles-wrapper h5, +.editor-styles-wrapper h6, .editor-styles-wrapper .has-drop-cap:not(:focus)::first-letter, .editor-styles-wrapper cite, .editor-styles-wrapper figcaption, @@ -138,12 +138,12 @@ Inter variable font. Usage: .editor-post-title__block .editor-post-title__input, .editor-styles-wrapper .wp-block-post-title, - .editor-styles-wrapper .wp-block h1, - .editor-styles-wrapper .wp-block h2, - .editor-styles-wrapper .wp-block h3, - .editor-styles-wrapper .wp-block h4, - .editor-styles-wrapper .wp-block h5, - .editor-styles-wrapper .wp-block h6, + .editor-styles-wrapper h1, + .editor-styles-wrapper h2, + .editor-styles-wrapper h3, + .editor-styles-wrapper h4, + .editor-styles-wrapper h5, + .editor-styles-wrapper h6, .editor-styles-wrapper .has-drop-cap:not(:focus)::first-letter, .editor-styles-wrapper cite, .editor-styles-wrapper figcaption, @@ -242,12 +242,12 @@ Inter variable font. Usage: .editor-post-title__block .editor-post-title__input, .editor-styles-wrapper .wp-block-post-title, -.editor-styles-wrapper .wp-block h1, -.editor-styles-wrapper .wp-block h2, -.editor-styles-wrapper .wp-block h3, -.editor-styles-wrapper .wp-block h4, -.editor-styles-wrapper .wp-block h5, -.editor-styles-wrapper .wp-block h6 { +.editor-styles-wrapper h1, +.editor-styles-wrapper h2, +.editor-styles-wrapper h3, +.editor-styles-wrapper h4, +.editor-styles-wrapper h5, +.editor-styles-wrapper h6 { font-feature-settings: "lnum"; font-variant-numeric: lining-nums; font-weight: 700; @@ -259,29 +259,35 @@ Inter variable font. Usage: .editor-post-title__block .editor-post-title__input, .editor-styles-wrapper .wp-block-post-title, -.editor-styles-wrapper .wp-block h1 { +.editor-styles-wrapper h1, +.editor-styles-wrapper .heading-size-1 { font-size: 36px; font-weight: 800; line-height: 1.138888889; } -.editor-styles-wrapper .wp-block h2 { +.editor-styles-wrapper h2, +.editor-styles-wrapper .heading-size-2 { font-size: 32px; } -.editor-styles-wrapper .wp-block h3 { +.editor-styles-wrapper h3, +.editor-styles-wrapper .heading-size-3 { font-size: 28px; } -.editor-styles-wrapper .wp-block h4 { +.editor-styles-wrapper h4, +.editor-styles-wrapper .heading-size-4 { font-size: 24px; } -.editor-styles-wrapper .wp-block h5 { +.editor-styles-wrapper h5, +.editor-styles-wrapper .heading-size-5 { font-size: 21px; } -.editor-styles-wrapper .wp-block h6 { +.editor-styles-wrapper h6, +.editor-styles-wrapper .heading-size-6 { font-size: 16px; letter-spacing: 0.03125em; text-transform: uppercase; @@ -1248,23 +1254,28 @@ hr.wp-block-separator.is-style-dots::before { .editor-post-title__block .editor-post-title__input, .editor-styles-wrapper .wp-block-post-title, - .editor-styles-wrapper .wp-block h1 { + .editor-styles-wrapper h1, + .editor-styles-wrapper .heading-size-1 { font-size: 64px; } - .editor-styles-wrapper .wp-block h2 { + .editor-styles-wrapper h2, + .editor-styles-wrapper .heading-size-2 { font-size: 48px; } - .editor-styles-wrapper .wp-block h3 { + .editor-styles-wrapper h3, + .editor-styles-wrapper .heading-size-3 { font-size: 40px; } - .editor-styles-wrapper .wp-block h4 { + .editor-styles-wrapper h4, + .editor-styles-wrapper .heading-size-4 { font-size: 32px; } - .editor-styles-wrapper .wp-block h5 { + .editor-styles-wrapper h5, + .editor-styles-wrapper .heading-size-5 { font-size: 24px; } @@ -1427,11 +1438,13 @@ hr.wp-block-separator.is-style-dots::before { .editor-post-title__block .editor-post-title__input, .editor-styles-wrapper .wp-block-post-title, - .editor-styles-wrapper .wp-block h1 { + .editor-styles-wrapper h1, + .editor-styles-wrapper .heading-size-1 { font-size: 84px; } - .editor-styles-wrapper .wp-block h6 { + .editor-styles-wrapper h6, + .editor-styles-wrapper .heading-size-6 { font-size: 18px; } diff --git a/wp-content/themes/twentytwenty/assets/css/editor-style-block.css b/wp-content/themes/twentytwenty/assets/css/editor-style-block.css index 809b82166172..eb8e2abf5d62 100644 --- a/wp-content/themes/twentytwenty/assets/css/editor-style-block.css +++ b/wp-content/themes/twentytwenty/assets/css/editor-style-block.css @@ -121,12 +121,12 @@ Inter variable font. Usage: .editor-post-title__block .editor-post-title__input, .editor-styles-wrapper .wp-block-post-title, -.editor-styles-wrapper .wp-block h1, -.editor-styles-wrapper .wp-block h2, -.editor-styles-wrapper .wp-block h3, -.editor-styles-wrapper .wp-block h4, -.editor-styles-wrapper .wp-block h5, -.editor-styles-wrapper .wp-block h6, +.editor-styles-wrapper h1, +.editor-styles-wrapper h2, +.editor-styles-wrapper h3, +.editor-styles-wrapper h4, +.editor-styles-wrapper h5, +.editor-styles-wrapper h6, .editor-styles-wrapper .has-drop-cap:not(:focus)::first-letter, .editor-styles-wrapper cite, .editor-styles-wrapper figcaption, @@ -138,12 +138,12 @@ Inter variable font. Usage: .editor-post-title__block .editor-post-title__input, .editor-styles-wrapper .wp-block-post-title, - .editor-styles-wrapper .wp-block h1, - .editor-styles-wrapper .wp-block h2, - .editor-styles-wrapper .wp-block h3, - .editor-styles-wrapper .wp-block h4, - .editor-styles-wrapper .wp-block h5, - .editor-styles-wrapper .wp-block h6, + .editor-styles-wrapper h1, + .editor-styles-wrapper h2, + .editor-styles-wrapper h3, + .editor-styles-wrapper h4, + .editor-styles-wrapper h5, + .editor-styles-wrapper h6, .editor-styles-wrapper .has-drop-cap:not(:focus)::first-letter, .editor-styles-wrapper cite, .editor-styles-wrapper figcaption, @@ -242,12 +242,12 @@ Inter variable font. Usage: .editor-post-title__block .editor-post-title__input, .editor-styles-wrapper .wp-block-post-title, -.editor-styles-wrapper .wp-block h1, -.editor-styles-wrapper .wp-block h2, -.editor-styles-wrapper .wp-block h3, -.editor-styles-wrapper .wp-block h4, -.editor-styles-wrapper .wp-block h5, -.editor-styles-wrapper .wp-block h6 { +.editor-styles-wrapper h1, +.editor-styles-wrapper h2, +.editor-styles-wrapper h3, +.editor-styles-wrapper h4, +.editor-styles-wrapper h5, +.editor-styles-wrapper h6 { font-feature-settings: "lnum"; font-variant-numeric: lining-nums; font-weight: 700; @@ -259,29 +259,35 @@ Inter variable font. Usage: .editor-post-title__block .editor-post-title__input, .editor-styles-wrapper .wp-block-post-title, -.editor-styles-wrapper .wp-block h1 { +.editor-styles-wrapper h1, +.editor-styles-wrapper .heading-size-1 { font-size: 36px; font-weight: 800; line-height: 1.138888889; } -.editor-styles-wrapper .wp-block h2 { +.editor-styles-wrapper h2, +.editor-styles-wrapper .heading-size-2 { font-size: 32px; } -.editor-styles-wrapper .wp-block h3 { +.editor-styles-wrapper h3, +.editor-styles-wrapper .heading-size-3 { font-size: 28px; } -.editor-styles-wrapper .wp-block h4 { +.editor-styles-wrapper h4, +.editor-styles-wrapper .heading-size-4 { font-size: 24px; } -.editor-styles-wrapper .wp-block h5 { +.editor-styles-wrapper h5, +.editor-styles-wrapper .heading-size-5 { font-size: 21px; } -.editor-styles-wrapper .wp-block h6 { +.editor-styles-wrapper h6, +.editor-styles-wrapper .heading-size-6 { font-size: 16px; letter-spacing: 0.03125em; text-transform: uppercase; @@ -1252,23 +1258,28 @@ hr.wp-block-separator.is-style-dots::before { .editor-post-title__block .editor-post-title__input, .editor-styles-wrapper .wp-block-post-title, - .editor-styles-wrapper .wp-block h1 { + .editor-styles-wrapper h1, + .editor-styles-wrapper .heading-size-1 { font-size: 64px; } - .editor-styles-wrapper .wp-block h2 { + .editor-styles-wrapper h2, + .editor-styles-wrapper .heading-size-2 { font-size: 48px; } - .editor-styles-wrapper .wp-block h3 { + .editor-styles-wrapper h3, + .editor-styles-wrapper .heading-size-3 { font-size: 40px; } - .editor-styles-wrapper .wp-block h4 { + .editor-styles-wrapper h4, + .editor-styles-wrapper .heading-size-4 { font-size: 32px; } - .editor-styles-wrapper .wp-block h5 { + .editor-styles-wrapper h5, + .editor-styles-wrapper .heading-size-5 { font-size: 24px; } @@ -1431,11 +1442,13 @@ hr.wp-block-separator.is-style-dots::before { .editor-post-title__block .editor-post-title__input, .editor-styles-wrapper .wp-block-post-title, - .editor-styles-wrapper .wp-block h1 { + .editor-styles-wrapper h1, + .editor-styles-wrapper .heading-size-1 { font-size: 84px; } - .editor-styles-wrapper .wp-block h6 { + .editor-styles-wrapper h6, + .editor-styles-wrapper .heading-size-6 { font-size: 18px; } diff --git a/wp-content/themes/twentytwenty/assets/css/editor-style-classic-rtl.css b/wp-content/themes/twentytwenty/assets/css/editor-style-classic-rtl.css index 89ec55a63a5c..de2d9f87ddb7 100644 --- a/wp-content/themes/twentytwenty/assets/css/editor-style-classic-rtl.css +++ b/wp-content/themes/twentytwenty/assets/css/editor-style-classic-rtl.css @@ -215,29 +215,35 @@ body#tinymce.wp-editor.content h6 { margin: 40px 0 25px; } -body#tinymce.wp-editor.content h1 { +body#tinymce.wp-editor.content h1, +body#tinymce.wp-editor.content .heading-size-1 { font-size: 84px; font-weight: 800; line-height: 1.138888889; } -body#tinymce.wp-editor.content h2 { +body#tinymce.wp-editor.content h2, +body#tinymce.wp-editor.content .heading-size-2 { font-size: 48px; } -body#tinymce.wp-editor.content h3 { +body#tinymce.wp-editor.content h3, +body#tinymce.wp-editor.content .heading-size-3 { font-size: 40px; } -body#tinymce.wp-editor.content h4 { +body#tinymce.wp-editor.content h4, +body#tinymce.wp-editor.content .heading-size-4 { font-size: 32px; } -body#tinymce.wp-editor.content h5 { +body#tinymce.wp-editor.content h5, +body#tinymce.wp-editor.content .heading-size-5 { font-size: 24px; } -body#tinymce.wp-editor.content h6 { +body#tinymce.wp-editor.content h6, +body#tinymce.wp-editor.content .heading-size-6 { font-size: 18px; letter-spacing: 0.03125em; text-transform: uppercase; diff --git a/wp-content/themes/twentytwenty/assets/css/editor-style-classic.css b/wp-content/themes/twentytwenty/assets/css/editor-style-classic.css index 4a4a00e96762..d471b3723382 100644 --- a/wp-content/themes/twentytwenty/assets/css/editor-style-classic.css +++ b/wp-content/themes/twentytwenty/assets/css/editor-style-classic.css @@ -215,29 +215,35 @@ body#tinymce.wp-editor.content h6 { margin: 40px 0 25px; } -body#tinymce.wp-editor.content h1 { +body#tinymce.wp-editor.content h1, +body#tinymce.wp-editor.content .heading-size-1 { font-size: 84px; font-weight: 800; line-height: 1.138888889; } -body#tinymce.wp-editor.content h2 { +body#tinymce.wp-editor.content h2, +body#tinymce.wp-editor.content .heading-size-2 { font-size: 48px; } -body#tinymce.wp-editor.content h3 { +body#tinymce.wp-editor.content h3, +body#tinymce.wp-editor.content .heading-size-3 { font-size: 40px; } -body#tinymce.wp-editor.content h4 { +body#tinymce.wp-editor.content h4, +body#tinymce.wp-editor.content .heading-size-4 { font-size: 32px; } -body#tinymce.wp-editor.content h5 { +body#tinymce.wp-editor.content h5, +body#tinymce.wp-editor.content .heading-size-5 { font-size: 24px; } -body#tinymce.wp-editor.content h6 { +body#tinymce.wp-editor.content h6, +body#tinymce.wp-editor.content .heading-size-6 { font-size: 18px; letter-spacing: 0.03125em; text-transform: uppercase; diff --git a/wp-content/themes/twentytwenty/classes/class-twentytwenty-non-latin-languages.php b/wp-content/themes/twentytwenty/classes/class-twentytwenty-non-latin-languages.php index 731064eda388..c7d4896096ea 100644 --- a/wp-content/themes/twentytwenty/classes/class-twentytwenty-non-latin-languages.php +++ b/wp-content/themes/twentytwenty/classes/class-twentytwenty-non-latin-languages.php @@ -119,7 +119,7 @@ public static function get_non_latin_css( $type = 'front-end' ) { 'twentytwenty_get_localized_font_family_elements', array( 'front-end' => array( 'body', 'input', 'textarea', 'button', '.button', '.faux-button', '.wp-block-button__link', '.wp-block-file__button', '.has-drop-cap:not(:focus)::first-letter', '.entry-content .wp-block-archives', '.entry-content .wp-block-categories', '.entry-content .wp-block-cover-image', '.entry-content .wp-block-latest-comments', '.entry-content .wp-block-latest-posts', '.entry-content .wp-block-pullquote', '.entry-content .wp-block-quote.is-large', '.entry-content .wp-block-quote.is-style-large', '.entry-content .wp-block-archives *', '.entry-content .wp-block-categories *', '.entry-content .wp-block-latest-posts *', '.entry-content .wp-block-latest-comments *', '.entry-content p', '.entry-content ol', '.entry-content ul', '.entry-content dl', '.entry-content dt', '.entry-content cite', '.entry-content figcaption', '.entry-content .wp-caption-text', '.comment-content p', '.comment-content ol', '.comment-content ul', '.comment-content dl', '.comment-content dt', '.comment-content cite', '.comment-content figcaption', '.comment-content .wp-caption-text', '.widget_text p', '.widget_text ol', '.widget_text ul', '.widget_text dl', '.widget_text dt', '.widget-content .rssSummary', '.widget-content cite', '.widget-content figcaption', '.widget-content .wp-caption-text' ), - 'block-editor' => array( '.editor-styles-wrapper > *', '.editor-styles-wrapper p', '.editor-styles-wrapper ol', '.editor-styles-wrapper ul', '.editor-styles-wrapper dl', '.editor-styles-wrapper dt', '.editor-post-title__block .editor-post-title__input', '.editor-styles-wrapper .wp-block-post-title', '.editor-styles-wrapper .wp-block h1', '.editor-styles-wrapper .wp-block h2', '.editor-styles-wrapper .wp-block h3', '.editor-styles-wrapper .wp-block h4', '.editor-styles-wrapper .wp-block h5', '.editor-styles-wrapper .wp-block h6', '.editor-styles-wrapper .has-drop-cap:not(:focus)::first-letter', '.editor-styles-wrapper cite', '.editor-styles-wrapper figcaption', '.editor-styles-wrapper .wp-caption-text' ), + 'block-editor' => array( '.editor-styles-wrapper > *', '.editor-styles-wrapper p', '.editor-styles-wrapper ol', '.editor-styles-wrapper ul', '.editor-styles-wrapper dl', '.editor-styles-wrapper dt', '.editor-post-title__block .editor-post-title__input', '.editor-styles-wrapper .wp-block-post-title', '.editor-styles-wrapper h1', '.editor-styles-wrapper h2', '.editor-styles-wrapper h3', '.editor-styles-wrapper h4', '.editor-styles-wrapper h5', '.editor-styles-wrapper h6', '.editor-styles-wrapper .has-drop-cap:not(:focus)::first-letter', '.editor-styles-wrapper cite', '.editor-styles-wrapper figcaption', '.editor-styles-wrapper .wp-caption-text' ), 'classic-editor' => array( 'body#tinymce.wp-editor', 'body#tinymce.wp-editor p', 'body#tinymce.wp-editor ol', 'body#tinymce.wp-editor ul', 'body#tinymce.wp-editor dl', 'body#tinymce.wp-editor dt', 'body#tinymce.wp-editor figcaption', 'body#tinymce.wp-editor .wp-caption-text', 'body#tinymce.wp-editor .wp-caption-dd', 'body#tinymce.wp-editor cite', 'body#tinymce.wp-editor table' ), ) ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 1d32393fcc61..05e9a56ec82d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.1-alpha-54153'; +$wp_version = '6.1-alpha-54154'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.