Skip to content

Commit

Permalink
Cover block :Add back missing styles (#38362)
Browse files Browse the repository at this point in the history
* Add back missing styles to ensure existing cover blocks show correction dimRatio
Co-authored-by: Glen Davies <glen.davies@a8c.com>
  • Loading branch information
glendaviesnz authored and Mamaduka committed Feb 16, 2022
1 parent c8ee14a commit 83440d9
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packages/block-library/src/cover/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,19 @@
opacity: 0.5;
}

// The following styles are needed to support legacy blocks added prior to the update
// that moved opacity to a nested span.
// https://github.com/WordPress/gutenberg/pull/35065
// https://github.com/WordPress/gutenberg/pull/38362
@for $i from 1 through 10 {
&.has-background-dim.has-background-dim-#{ $i * 10 } {
&:not(.has-background-gradient)::before,
.wp-block-cover__gradient-background {
opacity: $i * 0.1;
}
}
}

@for $i from 0 through 10 {
.wp-block-cover__gradient-background.has-background-dim.has-background-dim-#{ $i * 10 } {
opacity: $i * 0.1;
Expand Down

0 comments on commit 83440d9

Please sign in to comment.