-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cover block: fix duotone when background is set to fixed (#40554)
- Loading branch information
1 parent
88cb8e4
commit 81dc943
Showing
13 changed files
with
470 additions
and
238 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
test/integration/fixtures/blocks/core__cover__deprecated-10.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<!-- wp:cover {"url":"https://w.wiki/59Sd","id":609,"dimRatio":50} --> | ||
<div class="wp-block-cover"><span aria-hidden="true" class="wp-block-cover__background has-background-dim"></span><img class="wp-block-cover__image-background wp-image-609" alt="" src="https://w.wiki/59Sd" data-object-fit="cover"/><div class="wp-block-cover__inner-container"><!-- wp:paragraph {"align":"center","placeholder":"Write title…","fontSize":"large"} --> | ||
<p class="has-text-align-center has-large-font-size"></p> | ||
<!-- /wp:paragraph --></div></div> | ||
<!-- /wp:cover --> |
31 changes: 31 additions & 0 deletions
31
test/integration/fixtures/blocks/core__cover__deprecated-10.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
[ | ||
{ | ||
"name": "core/cover", | ||
"isValid": true, | ||
"attributes": { | ||
"url": "https://w.wiki/59Sd", | ||
"useFeaturedImage": false, | ||
"id": 609, | ||
"alt": "", | ||
"hasParallax": false, | ||
"isRepeated": false, | ||
"dimRatio": 50, | ||
"backgroundType": "image", | ||
"isDark": true | ||
}, | ||
"innerBlocks": [ | ||
{ | ||
"name": "core/paragraph", | ||
"isValid": true, | ||
"attributes": { | ||
"align": "center", | ||
"content": "", | ||
"dropCap": false, | ||
"placeholder": "Write title…", | ||
"fontSize": "large" | ||
}, | ||
"innerBlocks": [] | ||
} | ||
] | ||
} | ||
] |
31 changes: 31 additions & 0 deletions
31
test/integration/fixtures/blocks/core__cover__deprecated-10.parsed.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
[ | ||
{ | ||
"blockName": "core/cover", | ||
"attrs": { | ||
"url": "https://w.wiki/59Sd", | ||
"id": 609, | ||
"dimRatio": 50 | ||
}, | ||
"innerBlocks": [ | ||
{ | ||
"blockName": "core/paragraph", | ||
"attrs": { | ||
"align": "center", | ||
"placeholder": "Write title…", | ||
"fontSize": "large" | ||
}, | ||
"innerBlocks": [], | ||
"innerHTML": "\n\t<p class=\"has-text-align-center has-large-font-size\"></p>\n\t", | ||
"innerContent": [ | ||
"\n\t<p class=\"has-text-align-center has-large-font-size\"></p>\n\t" | ||
] | ||
} | ||
], | ||
"innerHTML": "\n<div class=\"wp-block-cover\"><span aria-hidden=\"true\" class=\"wp-block-cover__background has-background-dim\"></span><img class=\"wp-block-cover__image-background wp-image-609\" alt=\"\" src=\"https://w.wiki/59Sd\" data-object-fit=\"cover\"/><div class=\"wp-block-cover__inner-container\"></div></div>\n\t", | ||
"innerContent": [ | ||
"\n<div class=\"wp-block-cover\"><span aria-hidden=\"true\" class=\"wp-block-cover__background has-background-dim\"></span><img class=\"wp-block-cover__image-background wp-image-609\" alt=\"\" src=\"https://w.wiki/59Sd\" data-object-fit=\"cover\"/><div class=\"wp-block-cover__inner-container\">", | ||
null, | ||
"</div></div>\n\t" | ||
] | ||
} | ||
] |
5 changes: 5 additions & 0 deletions
5
test/integration/fixtures/blocks/core__cover__deprecated-10.serialized.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<!-- wp:cover {"url":"https://w.wiki/59Sd","id":609,"dimRatio":50} --> | ||
<div class="wp-block-cover"><span aria-hidden="true" class="wp-block-cover__background has-background-dim"></span><img class="wp-block-cover__image-background wp-image-609" alt="" src="https://w.wiki/59Sd" data-object-fit="cover"/><div class="wp-block-cover__inner-container"><!-- wp:paragraph {"align":"center","placeholder":"Write title…","fontSize":"large"} --> | ||
<p class="has-text-align-center has-large-font-size"></p> | ||
<!-- /wp:paragraph --></div></div> | ||
<!-- /wp:cover --> |
5 changes: 5 additions & 0 deletions
5
test/integration/fixtures/blocks/core__cover__duotone-fixed-background.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<!-- wp:cover {"url":"https://w.wiki/59So","id":612,"hasParallax":true,"isRepeated":true,"dimRatio":10,"isDark":false,"style":{"color":{"duotone":["#8c00b7","#fcff41"]}}} --> | ||
<div class="wp-block-cover is-light has-parallax is-repeated"><span aria-hidden="true" class="wp-block-cover__background has-background-dim-10 has-background-dim"></span><div role="img" class="wp-block-cover__image-background wp-image-612 has-parallax is-repeated" style="background-position:50% 50%;background-image:url(https://w.wiki/59So)"></div><div class="wp-block-cover__inner-container"><!-- wp:paragraph {"align":"center","placeholder":"Write title…","fontSize":"large"} --> | ||
<p class="has-text-align-center has-large-font-size"></p> | ||
<!-- /wp:paragraph --></div></div> | ||
<!-- /wp:cover --> |
36 changes: 36 additions & 0 deletions
36
test/integration/fixtures/blocks/core__cover__duotone-fixed-background.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
[ | ||
{ | ||
"name": "core/cover", | ||
"isValid": true, | ||
"attributes": { | ||
"url": "https://w.wiki/59So", | ||
"useFeaturedImage": false, | ||
"id": 612, | ||
"alt": "", | ||
"hasParallax": true, | ||
"isRepeated": true, | ||
"dimRatio": 10, | ||
"backgroundType": "image", | ||
"isDark": false, | ||
"style": { | ||
"color": { | ||
"duotone": [ "#8c00b7", "#fcff41" ] | ||
} | ||
} | ||
}, | ||
"innerBlocks": [ | ||
{ | ||
"name": "core/paragraph", | ||
"isValid": true, | ||
"attributes": { | ||
"align": "center", | ||
"content": "", | ||
"dropCap": false, | ||
"placeholder": "Write title…", | ||
"fontSize": "large" | ||
}, | ||
"innerBlocks": [] | ||
} | ||
] | ||
} | ||
] |
Oops, something went wrong.