Skip to content

Commit

Permalink
Update specificity of text color declaration
Browse files Browse the repository at this point in the history
Block level global styling for cover block text colors were being overridden by default colors. This is because, for global styles, we were setting styles on the top-level cover block element. The default text color, however, was being set on the child cover block inner container.

Since the text content's nearest ancestor was the inner container, it was inheriting the inner containers text color declarations.
  • Loading branch information
jeyip committed Aug 19, 2021
1 parent 3e645c4 commit bef5402
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/block-library/src/cover/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
padding: 1em;
// This block has customizable padding, border-box makes that more predictable.
box-sizing: border-box;
color: $white;

&.has-parallax {
background-attachment: fixed;
Expand Down Expand Up @@ -104,7 +105,6 @@
.wp-block-cover__inner-container {
width: 100%;
z-index: z-index(".wp-block-cover__inner-container");
color: $white;
}

p,
Expand Down

0 comments on commit bef5402

Please sign in to comment.