Skip to content

Commit

Permalink
Cover Block: Restore opacity controls (#26625)
Browse files Browse the repository at this point in the history
  • Loading branch information
sirreal authored Nov 2, 2020
1 parent 4d2da07 commit f0600a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/block-library/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Bug Fixes

- Fix a regression where the Cover would not show opacity controls for the default overlay color ([#26625](https://github.com/WordPress/gutenberg/pull/26625)).
- Fix a regression ([#26545](https://github.com/WordPress/gutenberg/pull/26545)) where the Cover block lost its default background overlay color
([#26569](https://github.com/WordPress/gutenberg/pull/26569)).

Expand Down
3 changes: 1 addition & 2 deletions packages/block-library/src/cover/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,6 @@ function CoverEdit( {
}
}

const canDim = !! url && ( overlayColor.color || gradientValue );
const hasBackground = !! ( url || overlayColor.color || gradientValue );
const showFocalPointPicker =
isVideoBackground ||
Expand Down Expand Up @@ -426,7 +425,7 @@ function CoverEdit( {
},
] }
>
{ canDim && (
{ !! url && (
<RangeControl
label={ __( 'Opacity' ) }
value={ dimRatio }
Expand Down

0 comments on commit f0600a4

Please sign in to comment.