diff --git a/packages/block-library/src/cover/save.js b/packages/block-library/src/cover/save.js index 296dee39b0bb57..c12a316f30ea06 100644 --- a/packages/block-library/src/cover/save.js +++ b/packages/block-library/src/cover/save.js @@ -62,10 +62,14 @@ export default function save( { attributes } ) { ...( isImageBackground && ! isImgElement ? backgroundImageStyles( url ) : {} ), - backgroundColor: ! overlayColorClass ? customOverlayColor : undefined, minHeight: minHeight || undefined, }; + const bgStyle = { + backgroundColor: ! overlayColorClass ? customOverlayColor : undefined, + background: customGradient ? customGradient : undefined, + }; + const objectPosition = // prettier-ignore focalPoint && isImgElement @@ -99,9 +103,7 @@ export default function save( { attributes } ) { [ gradientClass ]: ! url && gradientClass, } ) } - style={ - customGradient ? { background: customGradient } : undefined - } + style={ bgStyle } /> { isImageBackground && isImgElement && url && ( diff --git a/test/integration/fixtures/blocks/core__cover__video-overlay.html b/test/integration/fixtures/blocks/core__cover__video-overlay.html index 0874131924fdf1..4e6828cdfc78c3 100644 --- a/test/integration/fixtures/blocks/core__cover__video-overlay.html +++ b/test/integration/fixtures/blocks/core__cover__video-overlay.html @@ -1,6 +1,6 @@ -
\n\t\t\tGuten Berg!\n\t\t
" } ], - "originalContent": "Guten Berg!