-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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: Heading and paragraph colors not applied inside the cover block #17728
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,15 +37,19 @@ | |
h2, | ||
.wp-block-cover-image-text, | ||
.wp-block-cover-text { | ||
color: $white; | ||
font-size: 2em; | ||
line-height: 1.25; | ||
z-index: 1; | ||
margin-bottom: 0; | ||
max-width: $content-width; | ||
padding: $block-padding; | ||
text-align: center; | ||
} | ||
|
||
h2:not(.has-text-color), | ||
.wp-block-cover-image-text, | ||
.wp-block-cover-text { | ||
color: $white; | ||
a, | ||
a:hover, | ||
a:focus, | ||
|
@@ -130,7 +134,9 @@ | |
h5, | ||
h6, | ||
.wp-block-subhead { | ||
color: inherit; | ||
&:not(.has-text-color) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not really important, but shouldn't this just be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think so we also want to have selector p:not(.has-text-color) and h1:not(.has-text-color) etc... Having the selectors nested in this way ensures we apply the rule to all the selectors (not just .wp-block-subhead) that don't have a text color. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, whoops. I misread the SCSS. 😛 |
||
color: inherit; | ||
} | ||
} | ||
} | ||
|
||
|
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.
Related to this #17704, why do we need to style h2? I guess this is not needed anymore right? (all the h2 references in this file). For example, you'll notice that it's impossible to "left align" and h2 inside a Cover.
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.
Hi, @youknowriad, I answered this subject at #17704 (comment).
I think we should address it in a different PR.