-
Notifications
You must be signed in to change notification settings - Fork 357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix reveal background #8385
base: trunk
Are you sure you want to change the base?
Fix reveal background #8385
Conversation
The background element is child of the cover block element.
wp-block-cover__background is child of wp-block-cover.
The other styles are already affecting the editor selectors.
Gradients are impacted by the other selector since it's not a child of the wp-block-cover__background
Preview changesI've detected changes to the following themes in this PR: Dalston.
I will update this comment with the latest preview links as you push more changes to this PR. Note The preview sites are created using WordPress Playground. You can add content, edit settings, and test the themes as you would on a real site, but please note that changes are not saved between sessions. |
1607230
to
d0a75b5
Compare
@@ -144,23 +144,27 @@ | |||
text-decoration: underline; | |||
} | |||
|
|||
.wp-block-cover.is-style-hover-reveal .wp-block-cover__inner-container { | |||
.wp-block-cover.is-style-hover-reveal .wp-block-cover__inner-container, | |||
.wp-block-cover.is-style-hover-reveal .wp-block-cover-text { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The addition of .wp-block-cover-text
is to fix the reveal in old versions of Gutenberg where it didn't have the InnerBlocks in the Cover yet.
31b2f9f
to
090dba3
Compare
@@ -2,10 +2,10 @@ | |||
* Editor | |||
*/ | |||
|
|||
#editor .wp-block-cover-image.is-style-hover-reveal.has-background-dim.has-background-dim .wp-block-cover__gradient-background, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just remove the not needed duplicate selector .has-background-dim.has-background-dim
.
opacity: 1; | ||
} | ||
|
||
/* Dim */ | ||
|
||
.wp-block-cover.is-style-hover-reveal.has-background-dim:before, | ||
.wp-block-cover.is-style-hover-reveal.has-background-dim:not(.has-background-gradient):before, | ||
.wp-block-cover.is-style-hover-reveal.has-background-dim.has-background-gradient .wp-block-cover__gradient-background { | ||
.wp-block-cover.is-style-hover-reveal.has-background-dim.has-background-gradient .wp-block-cover__gradient-background, | ||
.wp-block-cover.is-style-hover-reveal .wp-block-cover__background.has-background-dim { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the current Gutenberg version the has-background-dim
class is applied to the element .wp-block-cover__background
and not to the .wp-block-cover
.
Theme-Check resultsdalston: There are required changes on the theme ❌.❎ REQUIRED
💡 RECOMMENDED (13)
|
Changes proposed in this Pull Request:
It fixes the Hover Reveal style of the Cover block for the latest versions of WordPress.
Known issues:
#8386
Test instructions:
I tested upgrading to all major releases from 5.0 (5.1, 5.2, 5.3...). And I tried to simplify it getting some specific versions. But feel free to test bumping 1 in 1 if you have time. :)
Related issue(s):
#8377