- { url &&
- ( gradient || customGradient ) &&
- dimRatio !== 0 && (
-
+ );
},
- {
- attributes: {
- ...blockAttributes,
- title: {
- type: 'string',
- source: 'html',
- selector: 'p',
- },
- contentAlign: {
- type: 'string',
- default: 'center',
- },
+ migrate: migrateDimRatio,
+};
+
+const v4 = {
+ attributes: {
+ ...blockAttributes,
+ minHeight: {
+ type: 'number',
},
- supports: {
- align: true,
+ gradient: {
+ type: 'string',
},
- save( { attributes } ) {
- const {
- backgroundType,
- contentAlign,
- customOverlayColor,
- dimRatio,
- focalPoint,
- hasParallax,
- overlayColor,
- title,
- url,
- } = attributes;
- const overlayColorClass = getColorClassName(
- 'background-color',
- overlayColor
- );
- const style =
- backgroundType === IMAGE_BACKGROUND_TYPE
- ? backgroundImageStyles( url )
- : {};
- if ( ! overlayColorClass ) {
- style.backgroundColor = customOverlayColor;
- }
- if ( focalPoint && ! hasParallax ) {
- style.backgroundPosition = `${ focalPoint.x * 100 }% ${
- focalPoint.y * 100
- }%`;
+ customGradient: {
+ type: 'string',
+ },
+ },
+ supports: {
+ align: true,
+ },
+ save( { attributes } ) {
+ const {
+ backgroundType,
+ gradient,
+ customGradient,
+ customOverlayColor,
+ dimRatio,
+ focalPoint,
+ hasParallax,
+ overlayColor,
+ url,
+ minHeight,
+ } = attributes;
+ const overlayColorClass = getColorClassName(
+ 'background-color',
+ overlayColor
+ );
+ const gradientClass = __experimentalGetGradientClass( gradient );
+
+ const style =
+ backgroundType === IMAGE_BACKGROUND_TYPE
+ ? backgroundImageStyles( url )
+ : {};
+ if ( ! overlayColorClass ) {
+ style.backgroundColor = customOverlayColor;
+ }
+ if ( focalPoint && ! hasParallax ) {
+ style.backgroundPosition = `${ focalPoint.x * 100 }% ${
+ focalPoint.y * 100
+ }%`;
+ }
+ if ( customGradient && ! url ) {
+ style.background = customGradient;
+ }
+ style.minHeight = minHeight || undefined;
+
+ const classes = classnames(
+ dimRatioToClassV1( dimRatio ),
+ overlayColorClass,
+ {
+ 'has-background-dim': dimRatio !== 0,
+ 'has-parallax': hasParallax,
+ 'has-background-gradient': customGradient,
+ [ gradientClass ]: ! url && gradientClass,
}
+ );
- const classes = classnames(
- dimRatioToClass( dimRatio ),
- overlayColorClass,
- {
- 'has-background-dim': dimRatio !== 0,
- 'has-parallax': hasParallax,
- [ `has-${ contentAlign }-content` ]:
- contentAlign !== 'center',
- }
- );
-
- return (
-
- { VIDEO_BACKGROUND_TYPE === backgroundType && url && (
-
- ) }
- { ! RichText.isEmpty( title ) && (
-
- ) }
+ return (
+
+ { url && ( gradient || customGradient ) && dimRatio !== 0 && (
+
+ ) }
+ { VIDEO_BACKGROUND_TYPE === backgroundType && url && (
+
+ ) }
+
+
- );
- },
- migrate( attributes ) {
- return [
- omit( attributes, [ 'title', 'contentAlign' ] ),
- [
- createBlock( 'core/paragraph', {
- content: attributes.title,
- align: attributes.contentAlign,
- fontSize: 'large',
- placeholder: __( 'Write title…' ),
- } ),
- ],
- ];
- },
+
+ );
},
- {
- attributes: {
- ...blockAttributes,
- title: {
- type: 'string',
- source: 'html',
- selector: 'p',
- },
- contentAlign: {
- type: 'string',
- default: 'center',
- },
- align: {
- type: 'string',
- },
+ migrate: migrateDimRatio,
+};
+
+const v3 = {
+ attributes: {
+ ...blockAttributes,
+ title: {
+ type: 'string',
+ source: 'html',
+ selector: 'p',
},
- supports: {
- className: false,
+ contentAlign: {
+ type: 'string',
+ default: 'center',
},
- save( { attributes } ) {
- const {
- url,
- title,
- hasParallax,
- dimRatio,
- align,
- contentAlign,
- overlayColor,
- customOverlayColor,
- } = attributes;
- const overlayColorClass = getColorClassName(
- 'background-color',
- overlayColor
- );
- const style = backgroundImageStyles( url );
- if ( ! overlayColorClass ) {
- style.backgroundColor = customOverlayColor;
+ },
+ supports: {
+ align: true,
+ },
+ save( { attributes } ) {
+ const {
+ backgroundType,
+ contentAlign,
+ customOverlayColor,
+ dimRatio,
+ focalPoint,
+ hasParallax,
+ overlayColor,
+ title,
+ url,
+ } = attributes;
+ const overlayColorClass = getColorClassName(
+ 'background-color',
+ overlayColor
+ );
+ const style =
+ backgroundType === IMAGE_BACKGROUND_TYPE
+ ? backgroundImageStyles( url )
+ : {};
+ if ( ! overlayColorClass ) {
+ style.backgroundColor = customOverlayColor;
+ }
+ if ( focalPoint && ! hasParallax ) {
+ style.backgroundPosition = `${ focalPoint.x * 100 }% ${
+ focalPoint.y * 100
+ }%`;
+ }
+
+ const classes = classnames(
+ dimRatioToClassV1( dimRatio ),
+ overlayColorClass,
+ {
+ 'has-background-dim': dimRatio !== 0,
+ 'has-parallax': hasParallax,
+ [ `has-${ contentAlign }-content` ]: contentAlign !== 'center',
}
+ );
- const classes = classnames(
- 'wp-block-cover-image',
- dimRatioToClass( dimRatio ),
- overlayColorClass,
- {
- 'has-background-dim': dimRatio !== 0,
- 'has-parallax': hasParallax,
- [ `has-${ contentAlign }-content` ]:
- contentAlign !== 'center',
- },
- align ? `align${ align }` : null
- );
-
- return (
-
- { ! RichText.isEmpty( title ) && (
-
- ) }
-
- );
+ return (
+
+ { VIDEO_BACKGROUND_TYPE === backgroundType && url && (
+
+ ) }
+ { ! RichText.isEmpty( title ) && (
+
+ ) }
+
+ );
+ },
+ migrate( attributes ) {
+ const newAttribs = {
+ ...attributes,
+ dimRatio: ! attributes.url ? 100 : attributes.dimRatio,
+ };
+
+ return [
+ omit( newAttribs, [ 'title', 'contentAlign' ] ),
+ [
+ createBlock( 'core/paragraph', {
+ content: attributes.title,
+ align: attributes.contentAlign,
+ fontSize: 'large',
+ placeholder: __( 'Write title…' ),
+ } ),
+ ],
+ ];
+ },
+};
+
+const v2 = {
+ attributes: {
+ ...blockAttributes,
+ title: {
+ type: 'string',
+ source: 'html',
+ selector: 'p',
+ },
+ contentAlign: {
+ type: 'string',
+ default: 'center',
},
- migrate( attributes ) {
- return [
- omit( attributes, [ 'title', 'contentAlign', 'align' ] ),
- [
- createBlock( 'core/paragraph', {
- content: attributes.title,
- align: attributes.contentAlign,
- fontSize: 'large',
- placeholder: __( 'Write title…' ),
- } ),
- ],
- ];
+ align: {
+ type: 'string',
},
},
- {
- attributes: {
- ...blockAttributes,
- title: {
- type: 'string',
- source: 'html',
- selector: 'h2',
- },
- align: {
- type: 'string',
- },
- contentAlign: {
- type: 'string',
- default: 'center',
+ supports: {
+ className: false,
+ },
+ save( { attributes } ) {
+ const {
+ url,
+ title,
+ hasParallax,
+ dimRatio,
+ align,
+ contentAlign,
+ overlayColor,
+ customOverlayColor,
+ } = attributes;
+ const overlayColorClass = getColorClassName(
+ 'background-color',
+ overlayColor
+ );
+ const style = backgroundImageStyles( url );
+ if ( ! overlayColorClass ) {
+ style.backgroundColor = customOverlayColor;
+ }
+
+ const classes = classnames(
+ 'wp-block-cover-image',
+ dimRatioToClassV1( dimRatio ),
+ overlayColorClass,
+ {
+ 'has-background-dim': dimRatio !== 0,
+ 'has-parallax': hasParallax,
+ [ `has-${ contentAlign }-content` ]: contentAlign !== 'center',
},
+ align ? `align${ align }` : null
+ );
+
+ return (
+
+ { ! RichText.isEmpty( title ) && (
+
+ ) }
+
+ );
+ },
+ migrate( attributes ) {
+ const newAttribs = {
+ ...attributes,
+ dimRatio: ! attributes.url ? 100 : attributes.dimRatio,
+ };
+ return [
+ omit( newAttribs, [ 'title', 'contentAlign', 'align' ] ),
+ [
+ createBlock( 'core/paragraph', {
+ content: attributes.title,
+ align: attributes.contentAlign,
+ fontSize: 'large',
+ placeholder: __( 'Write title…' ),
+ } ),
+ ],
+ ];
+ },
+};
+
+const v1 = {
+ attributes: {
+ ...blockAttributes,
+ title: {
+ type: 'string',
+ source: 'html',
+ selector: 'h2',
},
- supports: {
- className: false,
- },
- save( { attributes } ) {
- const { url, title, hasParallax, dimRatio, align } = attributes;
- const style = backgroundImageStyles( url );
- const classes = classnames(
- 'wp-block-cover-image',
- dimRatioToClass( dimRatio ),
- {
- 'has-background-dim': dimRatio !== 0,
- 'has-parallax': hasParallax,
- },
- align ? `align${ align }` : null
- );
-
- return (
-
- );
+ align: {
+ type: 'string',
},
- migrate( attributes ) {
- return [
- omit( attributes, [ 'title', 'contentAlign', 'align' ] ),
- [
- createBlock( 'core/paragraph', {
- content: attributes.title,
- align: attributes.contentAlign,
- fontSize: 'large',
- placeholder: __( 'Write title…' ),
- } ),
- ],
- ];
+ contentAlign: {
+ type: 'string',
+ default: 'center',
},
},
-];
+ supports: {
+ className: false,
+ },
+ save( { attributes } ) {
+ const { url, title, hasParallax, dimRatio, align } = attributes;
+ const style = backgroundImageStyles( url );
+ const classes = classnames(
+ 'wp-block-cover-image',
+ dimRatioToClassV1( dimRatio ),
+ {
+ 'has-background-dim': dimRatio !== 0,
+ 'has-parallax': hasParallax,
+ },
+ align ? `align${ align }` : null
+ );
+
+ return (
+
+ );
+ },
+ migrate( attributes ) {
+ const newAttribs = {
+ ...attributes,
+ dimRatio: ! attributes.url ? 100 : attributes.dimRatio,
+ };
+ return [
+ omit( newAttribs, [ 'title', 'contentAlign', 'align' ] ),
+ [
+ createBlock( 'core/paragraph', {
+ content: attributes.title,
+ align: attributes.contentAlign,
+ fontSize: 'large',
+ placeholder: __( 'Write title…' ),
+ } ),
+ ],
+ ];
+ },
+};
-export default deprecated;
+export default [ v7, v6, v5, v4, v3, v2, v1 ];
diff --git a/packages/block-library/src/cover/edit.js b/packages/block-library/src/cover/edit.js
index 3584bc0b09a5bc..1f783024598ba7 100644
--- a/packages/block-library/src/cover/edit.js
+++ b/packages/block-library/src/cover/edit.js
@@ -406,13 +406,11 @@ function CoverEdit( {
const style = {
...( isImageBackground && ! isImgElement
? backgroundImageStyles( url )
- : {
- backgroundImage: gradientValue ? gradientValue : undefined,
- } ),
- backgroundColor: overlayColor.color,
+ : undefined ),
minHeight: temporaryMinHeight || minHeightWithUnit || undefined,
};
+ const bgStyle = { backgroundColor: overlayColor.color };
const mediaStyle = {
objectPosition:
focalPoint && isImgElement
@@ -531,7 +529,6 @@ function CoverEdit( {
url: undefined,
id: undefined,
backgroundType: undefined,
- dimRatio: undefined,
focalPoint: undefined,
hasParallax: undefined,
isRepeated: undefined,
@@ -556,21 +553,19 @@ function CoverEdit( {
},
] }
>
- { !! url && (
-
- setAttributes( {
- dimRatio: newDimRation,
- } )
- }
- min={ 0 }
- max={ 100 }
- step={ 10 }
- required
- />
- ) }
+
+ setAttributes( {
+ dimRatio: newDimRation,
+ } )
+ }
+ min={ 0 }
+ max={ 100 }
+ step={ 10 }
+ required
+ />
@@ -657,17 +652,12 @@ function CoverEdit( {
}
const classes = classnames(
- dimRatioToClass( dimRatio ),
{
'is-dark-theme': isDark,
'is-light': ! isDark,
- 'has-background-dim': dimRatio !== 0,
'is-transient': isUploadingMedia,
'has-parallax': hasParallax,
'is-repeated': isRepeated,
- [ overlayColor.class ]: overlayColor.class,
- 'has-background-gradient': gradientValue,
- [ gradientClass ]: ! url && gradientClass,
'has-custom-content-position': ! isContentPositionCenter(
contentPosition
),
@@ -702,16 +692,23 @@ function CoverEdit( {
} }
showHandle={ isSelected }
/>
- { url && gradientValue && dimRatio !== 0 && (
-
- ) }
+
+
+
{ url && isImageBackground && isImgElement && (
- { url && ( gradient || customGradient ) && dimRatio !== 0 && (
-
- ) }
+ ) }
+ style={ bgStyle }
+ />
+
{ isImageBackground && isImgElement && url && (
-
+
diff --git a/test/integration/fixtures/blocks/core__cover.html b/test/integration/fixtures/blocks/core__cover.html
index 6483b44fb3923c..8da6a870594839 100644
--- a/test/integration/fixtures/blocks/core__cover.html
+++ b/test/integration/fixtures/blocks/core__cover.html
@@ -1,12 +1,13 @@
-
-
-
+
+
+
+
diff --git a/test/integration/fixtures/blocks/core__cover.json b/test/integration/fixtures/blocks/core__cover.json
index 2d4fd0ffede218..0c55d2778cead8 100644
--- a/test/integration/fixtures/blocks/core__cover.json
+++ b/test/integration/fixtures/blocks/core__cover.json
@@ -19,15 +19,15 @@
"isValid": true,
"attributes": {
"align": "center",
- "content": "\n\t\t\tGuten Berg!\n\t\t",
+ "content": "\n Guten Berg!\n ",
"dropCap": false,
"placeholder": "Write title…",
"fontSize": "large"
},
"innerBlocks": [],
- "originalContent": "
\n\t\t\tGuten Berg!\n\t\t
"
+ "originalContent": "
\n Guten Berg!\n
"
}
],
- "originalContent": "
\n\t
\n\t
\n\t\t\n\t
\n
"
+ "originalContent": "
\n
\n
\n
\n \n
\n
"
}
]
diff --git a/test/integration/fixtures/blocks/core__cover.parsed.json b/test/integration/fixtures/blocks/core__cover.parsed.json
index f286f061a76c7a..f90273321b52bb 100644
--- a/test/integration/fixtures/blocks/core__cover.parsed.json
+++ b/test/integration/fixtures/blocks/core__cover.parsed.json
@@ -14,17 +14,17 @@
"fontSize": "large"
},
"innerBlocks": [],
- "innerHTML": "\n\t\t
\n\t\t\tGuten Berg!\n\t\t
\n\t\t",
+ "innerHTML": "\n
\n Guten Berg!\n
\n ",
"innerContent": [
- "\n\t\t
\n\t\t\tGuten Berg!\n\t\t
\n\t\t"
+ "\n
\n Guten Berg!\n
\n "
]
}
],
- "innerHTML": "\n
\n\t
\n\t
\n\t\t\n\t
\n
\n",
+ "innerHTML": "\n
\n
\n
\n
\n \n
\n
\n",
"innerContent": [
- "\n
\n\t
\n\t
\n\t\t",
+ "\n
\n
\n
\n
\n ",
null,
- "\n\t
\n
\n"
+ "\n
\n
\n"
]
}
]
diff --git a/test/integration/fixtures/blocks/core__cover.serialized.html b/test/integration/fixtures/blocks/core__cover.serialized.html
index b9dfae00e3e660..1e8377f99cafae 100644
--- a/test/integration/fixtures/blocks/core__cover.serialized.html
+++ b/test/integration/fixtures/blocks/core__cover.serialized.html
@@ -1,7 +1,7 @@
-
+
- Guten Berg!
-
+ Guten Berg!
+
diff --git a/test/integration/fixtures/blocks/core__cover__deprecated-1.serialized.html b/test/integration/fixtures/blocks/core__cover__deprecated-1.serialized.html
index f2ff32ce15567e..a8b4f46f37b16c 100644
--- a/test/integration/fixtures/blocks/core__cover__deprecated-1.serialized.html
+++ b/test/integration/fixtures/blocks/core__cover__deprecated-1.serialized.html
@@ -1,5 +1,5 @@
-
-
+
+
diff --git a/test/integration/fixtures/blocks/core__cover__deprecated-2.serialized.html b/test/integration/fixtures/blocks/core__cover__deprecated-2.serialized.html
index 623d9313edc553..eb9756f3e35a51 100644
--- a/test/integration/fixtures/blocks/core__cover__deprecated-2.serialized.html
+++ b/test/integration/fixtures/blocks/core__cover__deprecated-2.serialized.html
@@ -1,5 +1,5 @@
-
-
+
+
diff --git a/test/integration/fixtures/blocks/core__cover__deprecated-3.serialized.html b/test/integration/fixtures/blocks/core__cover__deprecated-3.serialized.html
index 33c9c0cbf4d044..72db79ed9ebee3 100644
--- a/test/integration/fixtures/blocks/core__cover__deprecated-3.serialized.html
+++ b/test/integration/fixtures/blocks/core__cover__deprecated-3.serialized.html
@@ -1,5 +1,5 @@
-
-
+
+
diff --git a/test/integration/fixtures/blocks/core__cover__deprecated-4.serialized.html b/test/integration/fixtures/blocks/core__cover__deprecated-4.serialized.html
index 8ddb7566feaf31..2507813b98cb3b 100644
--- a/test/integration/fixtures/blocks/core__cover__deprecated-4.serialized.html
+++ b/test/integration/fixtures/blocks/core__cover__deprecated-4.serialized.html
@@ -1,5 +1,5 @@
-
-
+
+
diff --git a/test/integration/fixtures/blocks/core__cover__deprecated-5.serialized.html b/test/integration/fixtures/blocks/core__cover__deprecated-5.serialized.html
index 4f110f17bce4fc..47ed576ca1716a 100644
--- a/test/integration/fixtures/blocks/core__cover__deprecated-5.serialized.html
+++ b/test/integration/fixtures/blocks/core__cover__deprecated-5.serialized.html
@@ -1,5 +1,5 @@
-
-
+
+
diff --git a/test/integration/fixtures/blocks/core__cover__deprecated-6.json b/test/integration/fixtures/blocks/core__cover__deprecated-6.json
index bc3c84f2f37a77..430339b2fe02cf 100644
--- a/test/integration/fixtures/blocks/core__cover__deprecated-6.json
+++ b/test/integration/fixtures/blocks/core__cover__deprecated-6.json
@@ -69,13 +69,12 @@
"attributes": {
"url": "http://localhost:8888/wp-content/uploads/2021/02/percy.jpg",
"id": 134,
- "alt": "",
"hasParallax": false,
- "isRepeated": false,
"dimRatio": 50,
"backgroundType": "image",
+ "isRepeated": false,
"contentPosition": "bottom right",
- "isDark": true
+ "alt": ""
},
"innerBlocks": [
{
diff --git a/test/integration/fixtures/blocks/core__cover__deprecated-6.serialized.html b/test/integration/fixtures/blocks/core__cover__deprecated-6.serialized.html
index d49a8e328beaac..a63cb1375d2ea0 100644
--- a/test/integration/fixtures/blocks/core__cover__deprecated-6.serialized.html
+++ b/test/integration/fixtures/blocks/core__cover__deprecated-6.serialized.html
@@ -1,5 +1,5 @@
-
+
Guten Berg!
@@ -7,13 +7,13 @@
-
+
-
-
+
+
diff --git a/test/integration/fixtures/blocks/core__cover__deprecated-7.html b/test/integration/fixtures/blocks/core__cover__deprecated-7.html
new file mode 100644
index 00000000000000..6483b44fb3923c
--- /dev/null
+++ b/test/integration/fixtures/blocks/core__cover__deprecated-7.html
@@ -0,0 +1,12 @@
+
+
+
+
+
+
diff --git a/test/integration/fixtures/blocks/core__cover__deprecated-7.json b/test/integration/fixtures/blocks/core__cover__deprecated-7.json
new file mode 100644
index 00000000000000..487021f31edf12
--- /dev/null
+++ b/test/integration/fixtures/blocks/core__cover__deprecated-7.json
@@ -0,0 +1,32 @@
+[
+ {
+ "clientId": "_clientId_0",
+ "name": "core/cover",
+ "isValid": true,
+ "attributes": {
+ "url": "data:image/jpeg;base64,/9j/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/yQALCAABAAEBAREA/8wABgAQEAX/2gAIAQEAAD8A0s8g/9k=",
+ "hasParallax": false,
+ "dimRatio": 40,
+ "backgroundType": "image",
+ "isRepeated": false,
+ "alt": ""
+ },
+ "innerBlocks": [
+ {
+ "clientId": "_clientId_0",
+ "name": "core/paragraph",
+ "isValid": true,
+ "attributes": {
+ "align": "center",
+ "content": "\n\t\t\tGuten Berg!\n\t\t",
+ "dropCap": false,
+ "placeholder": "Write title…",
+ "fontSize": "large"
+ },
+ "innerBlocks": [],
+ "originalContent": "
\n\t\t\tGuten Berg!\n\t\t
"
+ }
+ ],
+ "originalContent": "
\n\t
\n\t
\n\t\t\n\t
\n
"
+ }
+]
diff --git a/test/integration/fixtures/blocks/core__cover__deprecated-7.parsed.json b/test/integration/fixtures/blocks/core__cover__deprecated-7.parsed.json
new file mode 100644
index 00000000000000..f286f061a76c7a
--- /dev/null
+++ b/test/integration/fixtures/blocks/core__cover__deprecated-7.parsed.json
@@ -0,0 +1,30 @@
+[
+ {
+ "blockName": "core/cover",
+ "attrs": {
+ "url": "data:image/jpeg;base64,/9j/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/yQALCAABAAEBAREA/8wABgAQEAX/2gAIAQEAAD8A0s8g/9k=",
+ "dimRatio": 40
+ },
+ "innerBlocks": [
+ {
+ "blockName": "core/paragraph",
+ "attrs": {
+ "align": "center",
+ "placeholder": "Write title…",
+ "fontSize": "large"
+ },
+ "innerBlocks": [],
+ "innerHTML": "\n\t\t
\n\t\t\tGuten Berg!\n\t\t
\n\t\t",
+ "innerContent": [
+ "\n\t\t
\n\t\t\tGuten Berg!\n\t\t
\n\t\t"
+ ]
+ }
+ ],
+ "innerHTML": "\n
\n\t
\n\t
\n\t\t\n\t
\n
\n",
+ "innerContent": [
+ "\n
\n\t
\n\t
\n\t\t",
+ null,
+ "\n\t
\n
\n"
+ ]
+ }
+]
diff --git a/test/integration/fixtures/blocks/core__cover__deprecated-7.serialized.html b/test/integration/fixtures/blocks/core__cover__deprecated-7.serialized.html
new file mode 100644
index 00000000000000..0a5309cfd3012f
--- /dev/null
+++ b/test/integration/fixtures/blocks/core__cover__deprecated-7.serialized.html
@@ -0,0 +1,7 @@
+
+
+
diff --git a/test/integration/fixtures/blocks/core__cover__gradient-image.html b/test/integration/fixtures/blocks/core__cover__gradient-image.html
index d3b7ff36d19676..bd72d791a2a08e 100644
--- a/test/integration/fixtures/blocks/core__cover__gradient-image.html
+++ b/test/integration/fixtures/blocks/core__cover__gradient-image.html
@@ -1,7 +1,7 @@
-
-
-
+
+
+
Cover!
diff --git a/test/integration/fixtures/blocks/core__cover__gradient-image.json b/test/integration/fixtures/blocks/core__cover__gradient-image.json
index 929f65374caebb..b02fcb5caaca35 100644
--- a/test/integration/fixtures/blocks/core__cover__gradient-image.json
+++ b/test/integration/fixtures/blocks/core__cover__gradient-image.json
@@ -29,6 +29,6 @@
"originalContent": "
Cover!
"
}
],
- "originalContent": "
\n\t
\n\t
\n\t
\n\t\t\n\t
\n
"
+ "originalContent": "
\n\t
\n\t
\n\t
\n\t\t\n\t
\n
"
}
]
diff --git a/test/integration/fixtures/blocks/core__cover__gradient-image.parsed.json b/test/integration/fixtures/blocks/core__cover__gradient-image.parsed.json
index 85ba09669f4a74..e03c3b8cd41bb5 100644
--- a/test/integration/fixtures/blocks/core__cover__gradient-image.parsed.json
+++ b/test/integration/fixtures/blocks/core__cover__gradient-image.parsed.json
@@ -21,9 +21,9 @@
]
}
],
- "innerHTML": "\n
\n\t
\n\t
\n\t
\n\t\t\n\t
\n
\n",
+ "innerHTML": "\n
\n\t
\n\t
\n\t
\n\t\t\n\t
\n
\n",
"innerContent": [
- "\n
\n\t
\n\t
\n\t
\n\t\t",
+ "\n
\n\t
\n\t
\n\t
\n\t\t",
null,
"\n\t
\n
\n"
]
diff --git a/test/integration/fixtures/blocks/core__cover__gradient-image.serialized.html b/test/integration/fixtures/blocks/core__cover__gradient-image.serialized.html
index fec0e56873d6ed..6c07b2fe0952a8 100644
--- a/test/integration/fixtures/blocks/core__cover__gradient-image.serialized.html
+++ b/test/integration/fixtures/blocks/core__cover__gradient-image.serialized.html
@@ -1,5 +1,5 @@
-
+
diff --git a/test/integration/fixtures/blocks/core__cover__gradient-video.html b/test/integration/fixtures/blocks/core__cover__gradient-video.html
index 3a7071f0b55f2c..e4b0eb1323cf3c 100644
--- a/test/integration/fixtures/blocks/core__cover__gradient-video.html
+++ b/test/integration/fixtures/blocks/core__cover__gradient-video.html
@@ -1,6 +1,6 @@
-
-
+
+
diff --git a/test/integration/fixtures/blocks/core__cover__gradient-video.json b/test/integration/fixtures/blocks/core__cover__gradient-video.json
index a7de6527076d0e..c256b78cc8c494 100644
--- a/test/integration/fixtures/blocks/core__cover__gradient-video.json
+++ b/test/integration/fixtures/blocks/core__cover__gradient-video.json
@@ -29,6 +29,6 @@
"originalContent": "
Cover!
"
}
],
- "originalContent": "
"
+ "originalContent": "
"
}
]
diff --git a/test/integration/fixtures/blocks/core__cover__gradient-video.parsed.json b/test/integration/fixtures/blocks/core__cover__gradient-video.parsed.json
index deea3d091018e8..919ef20eaeadee 100644
--- a/test/integration/fixtures/blocks/core__cover__gradient-video.parsed.json
+++ b/test/integration/fixtures/blocks/core__cover__gradient-video.parsed.json
@@ -22,9 +22,9 @@
]
}
],
- "innerHTML": "\n
\n",
+ "innerHTML": "\n
\n",
"innerContent": [
- "\n
\n\t
\n\t
\n\t
\n\t\t",
+ "\n
\n\t
\n\t
\n\t
\n\t\t",
null,
"\n\t
\n
\n"
]
diff --git a/test/integration/fixtures/blocks/core__cover__gradient-video.serialized.html b/test/integration/fixtures/blocks/core__cover__gradient-video.serialized.html
index 670e9fb917acc9..d78c838b5a1022 100644
--- a/test/integration/fixtures/blocks/core__cover__gradient-video.serialized.html
+++ b/test/integration/fixtures/blocks/core__cover__gradient-video.serialized.html
@@ -1,5 +1,5 @@
-
+
diff --git a/test/integration/fixtures/blocks/core__cover__gradient.html b/test/integration/fixtures/blocks/core__cover__gradient.html
index e3e7b9af44777a..8bd16152d5bb13 100644
--- a/test/integration/fixtures/blocks/core__cover__gradient.html
+++ b/test/integration/fixtures/blocks/core__cover__gradient.html
@@ -1,5 +1,6 @@
-
+
+
Cover!
diff --git a/test/integration/fixtures/blocks/core__cover__gradient.json b/test/integration/fixtures/blocks/core__cover__gradient.json
index 756c96b44a6670..fd0e0f59dedcec 100644
--- a/test/integration/fixtures/blocks/core__cover__gradient.json
+++ b/test/integration/fixtures/blocks/core__cover__gradient.json
@@ -7,7 +7,7 @@
"alt": "",
"hasParallax": false,
"isRepeated": false,
- "dimRatio": 50,
+ "dimRatio": 100,
"backgroundType": "image",
"customGradient": "linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)",
"isDark": true
@@ -28,6 +28,6 @@
"originalContent": "
Cover!
"
}
],
- "originalContent": "
"
+ "originalContent": "
"
}
]
diff --git a/test/integration/fixtures/blocks/core__cover__gradient.parsed.json b/test/integration/fixtures/blocks/core__cover__gradient.parsed.json
index 9826a8c3dd1fd1..b0f8d37f9e5b44 100644
--- a/test/integration/fixtures/blocks/core__cover__gradient.parsed.json
+++ b/test/integration/fixtures/blocks/core__cover__gradient.parsed.json
@@ -19,9 +19,9 @@
]
}
],
- "innerHTML": "\n
\n",
+ "innerHTML": "\n
\n",
"innerContent": [
- "\n
\n\t
\n\t\t",
+ "\n
\n\t
\n\t
\n\t\t",
null,
"\n\t
\n
\n"
]
diff --git a/test/integration/fixtures/blocks/core__cover__gradient.serialized.html b/test/integration/fixtures/blocks/core__cover__gradient.serialized.html
index 92615e65131f9b..31aedff636c24d 100644
--- a/test/integration/fixtures/blocks/core__cover__gradient.serialized.html
+++ b/test/integration/fixtures/blocks/core__cover__gradient.serialized.html
@@ -1,5 +1,5 @@
-
+
diff --git a/test/integration/fixtures/blocks/core__cover__solid-color.html b/test/integration/fixtures/blocks/core__cover__solid-color.html
index b9a4b31cf71738..d08b70dfb3d791 100644
--- a/test/integration/fixtures/blocks/core__cover__solid-color.html
+++ b/test/integration/fixtures/blocks/core__cover__solid-color.html
@@ -1,5 +1,6 @@
-
+
+
diff --git a/test/integration/fixtures/blocks/core__cover__solid-color.json b/test/integration/fixtures/blocks/core__cover__solid-color.json
index e79359c1367442..c170062fdb975d 100644
--- a/test/integration/fixtures/blocks/core__cover__solid-color.json
+++ b/test/integration/fixtures/blocks/core__cover__solid-color.json
@@ -7,7 +7,7 @@
"alt": "",
"hasParallax": false,
"isRepeated": false,
- "dimRatio": 50,
+ "dimRatio": 100,
"overlayColor": "primary",
"backgroundType": "image",
"isDark": true
@@ -28,6 +28,6 @@
"originalContent": "
"
}
],
- "originalContent": "
"
+ "originalContent": "
"
}
]
diff --git a/test/integration/fixtures/blocks/core__cover__solid-color.parsed.json b/test/integration/fixtures/blocks/core__cover__solid-color.parsed.json
index ae0a44955001cb..9be3bb3d0db3a9 100644
--- a/test/integration/fixtures/blocks/core__cover__solid-color.parsed.json
+++ b/test/integration/fixtures/blocks/core__cover__solid-color.parsed.json
@@ -19,9 +19,9 @@
]
}
],
- "innerHTML": "\n
\n",
+ "innerHTML": "\n
\n",
"innerContent": [
- "\n
\n\t
\n\t\t",
+ "\n
\n\t
\n\t
\n\t\t",
null,
"\n\t
\n
\n"
]
diff --git a/test/integration/fixtures/blocks/core__cover__solid-color.serialized.html b/test/integration/fixtures/blocks/core__cover__solid-color.serialized.html
index d234e8512e986e..d8532c71201774 100644
--- a/test/integration/fixtures/blocks/core__cover__solid-color.serialized.html
+++ b/test/integration/fixtures/blocks/core__cover__solid-color.serialized.html
@@ -1,5 +1,5 @@
-
+
diff --git a/test/integration/fixtures/blocks/core__cover__video-overlay.html b/test/integration/fixtures/blocks/core__cover__video-overlay.html
index 596b6a30a2d4e7..4e6828cdfc78c3 100644
--- a/test/integration/fixtures/blocks/core__cover__video-overlay.html
+++ b/test/integration/fixtures/blocks/core__cover__video-overlay.html
@@ -1,18 +1,7 @@
-
-
+
-
+
\ No newline at end of file
diff --git a/test/integration/fixtures/blocks/core__cover__video-overlay.json b/test/integration/fixtures/blocks/core__cover__video-overlay.json
index 61c90de1e7ed5d..a9cc24589f4ae4 100644
--- a/test/integration/fixtures/blocks/core__cover__video-overlay.json
+++ b/test/integration/fixtures/blocks/core__cover__video-overlay.json
@@ -29,6 +29,6 @@
"originalContent": "
\n\t\t\tGuten Berg!\n\t\t
"
}
],
- "originalContent": "
"
+ "originalContent": "
"
}
]
diff --git a/test/integration/fixtures/blocks/core__cover__video-overlay.parsed.json b/test/integration/fixtures/blocks/core__cover__video-overlay.parsed.json
index d006fff3f70c23..00e871e84d25eb 100644
--- a/test/integration/fixtures/blocks/core__cover__video-overlay.parsed.json
+++ b/test/integration/fixtures/blocks/core__cover__video-overlay.parsed.json
@@ -22,9 +22,9 @@
]
}
],
- "innerHTML": "\n
\n",
+ "innerHTML": "\n
\n",
"innerContent": [
- "\n
\n\t
\n\t
\n\t\t",
+ "\n
\n\t
\n\t
\n\t
\n\t\t",
null,
"\n\t
\n
\n"
]
diff --git a/test/integration/fixtures/blocks/core__cover__video-overlay.serialized.html b/test/integration/fixtures/blocks/core__cover__video-overlay.serialized.html
index 4a641d0d15de34..9115273d4bc625 100644
--- a/test/integration/fixtures/blocks/core__cover__video-overlay.serialized.html
+++ b/test/integration/fixtures/blocks/core__cover__video-overlay.serialized.html
@@ -1,5 +1,5 @@
-
+
Guten Berg!
diff --git a/test/integration/fixtures/blocks/core__cover__video.html b/test/integration/fixtures/blocks/core__cover__video.html
index 317da363890d2c..c262722884f28e 100644
--- a/test/integration/fixtures/blocks/core__cover__video.html
+++ b/test/integration/fixtures/blocks/core__cover__video.html
@@ -1,17 +1,7 @@
-
-
+
+
+
diff --git a/test/integration/fixtures/blocks/core__cover__video.json b/test/integration/fixtures/blocks/core__cover__video.json
index d690fe3b723f2f..0e03ef9e6a5cef 100644
--- a/test/integration/fixtures/blocks/core__cover__video.json
+++ b/test/integration/fixtures/blocks/core__cover__video.json
@@ -28,6 +28,6 @@
"originalContent": "
\n\t\t\tGuten Berg!\n\t\t
"
}
],
- "originalContent": "
"
+ "originalContent": "
"
}
]
diff --git a/test/integration/fixtures/blocks/core__cover__video.parsed.json b/test/integration/fixtures/blocks/core__cover__video.parsed.json
index 2ad6d1de9d3c0b..d5a173779aec00 100644
--- a/test/integration/fixtures/blocks/core__cover__video.parsed.json
+++ b/test/integration/fixtures/blocks/core__cover__video.parsed.json
@@ -21,9 +21,9 @@
]
}
],
- "innerHTML": "\n
\n",
+ "innerHTML": "\n
\n",
"innerContent": [
- "\n
\n\t
\n\t
\n\t\t",
+ "\n
\n\t
\n\t
\n\t
\n\t\t",
null,
"\n\t
\n
\n"
]
diff --git a/test/integration/fixtures/blocks/core__cover__video.serialized.html b/test/integration/fixtures/blocks/core__cover__video.serialized.html
index 712cf71423a6e9..7e3a6c16b14e82 100644
--- a/test/integration/fixtures/blocks/core__cover__video.serialized.html
+++ b/test/integration/fixtures/blocks/core__cover__video.serialized.html
@@ -1,5 +1,5 @@
-