From be59f01e5f6428406ca334b41bfdfbeb8b9881b8 Mon Sep 17 00:00:00 2001 From: whyisjake Date: Fri, 15 May 2020 22:03:08 +0000 Subject: [PATCH] Bundled Themes: Twenty Nineteen center and right-aligned heading accents appear broken. Fixes the center and right aligned heading accents so that they align with the text, instead of just staying left-aligned. Bringing the changes in [47591] to the 5.4 branch. Props kjellr, melchoyce. Fixes #49699. Built from https://develop.svn.wordpress.org/branches/5.4@47806 git-svn-id: http://core.svn.wordpress.org/branches/5.4@47582 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../sass/mixins/_mixins-master.scss | 9 +++++ .../themes/twentynineteen/style-editor.css | 27 +++++++++++++ .../themes/twentynineteen/style-rtl.css | 38 +++++++++++++++++++ wp-content/themes/twentynineteen/style.css | 38 +++++++++++++++++++ wp-includes/version.php | 2 +- 5 files changed, 113 insertions(+), 1 deletion(-) diff --git a/wp-content/themes/twentynineteen/sass/mixins/_mixins-master.scss b/wp-content/themes/twentynineteen/sass/mixins/_mixins-master.scss index 16065f94ba..2cb12b3d4f 100644 --- a/wp-content/themes/twentynineteen/sass/mixins/_mixins-master.scss +++ b/wp-content/themes/twentynineteen/sass/mixins/_mixins-master.scss @@ -74,6 +74,15 @@ margin: $size__spacing-unit 0; width: 1em; } + + &.has-text-align-center:before { + margin-left: auto; + margin-right: auto; + } + + &.has-text-align-right:before { + margin-left: auto; + } } /* If we add the border using a regular CSS border, it won't look good on non-retina devices, diff --git a/wp-content/themes/twentynineteen/style-editor.css b/wp-content/themes/twentynineteen/style-editor.css index 0dbf12385a..3af45632c9 100644 --- a/wp-content/themes/twentynineteen/style-editor.css +++ b/wp-content/themes/twentynineteen/style-editor.css @@ -636,6 +636,15 @@ h1:before { width: 1em; } +h1.has-text-align-center:before { + margin-left: auto; + margin-right: auto; +} + +h1.has-text-align-right:before { + margin-left: auto; +} + @media only screen and (min-width: 768px) { h1 { font-size: 2.8125em; @@ -655,6 +664,15 @@ h2:before { width: 1em; } +h2.has-text-align-center:before { + margin-left: auto; + margin-right: auto; +} + +h2.has-text-align-right:before { + margin-left: auto; +} + @media only screen and (min-width: 768px) { h2 { font-size: 2.25em; @@ -768,6 +786,15 @@ figcaption, width: 1em; } +.editor-post-title__block.has-text-align-center:before { + margin-left: auto; + margin-right: auto; +} + +.editor-post-title__block.has-text-align-right:before { + margin-left: auto; +} + .editor-post-title__block:before { width: 2.8125em; margin-top: 0; diff --git a/wp-content/themes/twentynineteen/style-rtl.css b/wp-content/themes/twentynineteen/style-rtl.css index e6154c1801..b512ce8988 100644 --- a/wp-content/themes/twentynineteen/style-rtl.css +++ b/wp-content/themes/twentynineteen/style-rtl.css @@ -2527,6 +2527,17 @@ h2:before { width: 1em; } +h1:not(.site-title).has-text-align-center:before, +h2.has-text-align-center:before { + margin-right: auto; + margin-left: auto; +} + +h1:not(.site-title).has-text-align-right:before, +h2.has-text-align-right:before { + margin-right: auto; +} + hr { background-color: #767676; border: 0; @@ -4209,6 +4220,15 @@ body.page .main-navigation { width: 1em; } +.entry .entry-title.has-text-align-center:before { + margin-right: auto; + margin-left: auto; +} + +.entry .entry-title.has-text-align-right:before { + margin-right: auto; +} + .entry .entry-title a { color: inherit; } @@ -4493,6 +4513,15 @@ body.page .main-navigation { width: 1em; } +.author-bio .author-title.has-text-align-center:before { + margin-right: auto; + margin-left: auto; +} + +.author-bio .author-title.has-text-align-right:before { + margin-right: auto; +} + .author-bio .author-description { display: inline; color: #767676; @@ -4587,6 +4616,15 @@ body.page .main-navigation { width: 1em; } +.comments-area .comments-title-wrap .comments-title.has-text-align-center:before { + margin-right: auto; + margin-left: auto; +} + +.comments-area .comments-title-wrap .comments-title.has-text-align-right:before { + margin-right: auto; +} + @media only screen and (min-width: 768px) { .comments-area .comments-title-wrap .comments-title { flex: 1 0 calc(3 * (100vw / 12)); diff --git a/wp-content/themes/twentynineteen/style.css b/wp-content/themes/twentynineteen/style.css index 8b257611f3..e60203c813 100644 --- a/wp-content/themes/twentynineteen/style.css +++ b/wp-content/themes/twentynineteen/style.css @@ -2527,6 +2527,17 @@ h2:before { width: 1em; } +h1:not(.site-title).has-text-align-center:before, +h2.has-text-align-center:before { + margin-left: auto; + margin-right: auto; +} + +h1:not(.site-title).has-text-align-right:before, +h2.has-text-align-right:before { + margin-left: auto; +} + hr { background-color: #767676; border: 0; @@ -4215,6 +4226,15 @@ body.page .main-navigation { width: 1em; } +.entry .entry-title.has-text-align-center:before { + margin-left: auto; + margin-right: auto; +} + +.entry .entry-title.has-text-align-right:before { + margin-left: auto; +} + .entry .entry-title a { color: inherit; } @@ -4499,6 +4519,15 @@ body.page .main-navigation { width: 1em; } +.author-bio .author-title.has-text-align-center:before { + margin-left: auto; + margin-right: auto; +} + +.author-bio .author-title.has-text-align-right:before { + margin-left: auto; +} + .author-bio .author-description { display: inline; color: #767676; @@ -4593,6 +4622,15 @@ body.page .main-navigation { width: 1em; } +.comments-area .comments-title-wrap .comments-title.has-text-align-center:before { + margin-left: auto; + margin-right: auto; +} + +.comments-area .comments-title-wrap .comments-title.has-text-align-right:before { + margin-left: auto; +} + @media only screen and (min-width: 768px) { .comments-area .comments-title-wrap .comments-title { flex: 1 0 calc(3 * (100vw / 12)); diff --git a/wp-includes/version.php b/wp-includes/version.php index 33a538e14e..c9c662f16b 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.4.2-alpha-47805'; +$wp_version = '5.4.2-alpha-47806'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.