From 23704571754c162d3a863a30c9249e59f0378c47 Mon Sep 17 00:00:00 2001 From: Ian Belanger Date: Thu, 16 Apr 2020 19:45:19 +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. Props kjellr, melchoyce. Fixes #49699. git-svn-id: https://develop.svn.wordpress.org/trunk@47591 602fd350-edb4-49c9-b593-d223f7449a82 --- .../sass/mixins/_mixins-master.scss | 9 +++++ .../themes/twentynineteen/style-editor.css | 27 +++++++++++++ .../themes/twentynineteen/style-rtl.css | 38 +++++++++++++++++++ .../themes/twentynineteen/style.css | 38 +++++++++++++++++++ 4 files changed, 112 insertions(+) diff --git a/src/wp-content/themes/twentynineteen/sass/mixins/_mixins-master.scss b/src/wp-content/themes/twentynineteen/sass/mixins/_mixins-master.scss index 16065f94ba..2cb12b3d4f 100644 --- a/src/wp-content/themes/twentynineteen/sass/mixins/_mixins-master.scss +++ b/src/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/src/wp-content/themes/twentynineteen/style-editor.css b/src/wp-content/themes/twentynineteen/style-editor.css index edc4faa3dc..b1051e5bf6 100644 --- a/src/wp-content/themes/twentynineteen/style-editor.css +++ b/src/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/src/wp-content/themes/twentynineteen/style-rtl.css b/src/wp-content/themes/twentynineteen/style-rtl.css index 472573005a..662c40973a 100644 --- a/src/wp-content/themes/twentynineteen/style-rtl.css +++ b/src/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/src/wp-content/themes/twentynineteen/style.css b/src/wp-content/themes/twentynineteen/style.css index cda3cfe186..3fcb9dfaed 100644 --- a/src/wp-content/themes/twentynineteen/style.css +++ b/src/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));