-
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.
Fix: Cover block does not contain has-background-gradient class for p…
…redefined gradients
- Loading branch information
1 parent
c8ce275
commit 257968b
Showing
6 changed files
with
192 additions
and
1 deletion.
There are no files selected for viewing
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
11 changes: 11 additions & 0 deletions
11
packages/e2e-tests/fixtures/blocks/core__cover__deprecated-5.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,11 @@ | ||
<!-- wp:cover {"url":"data:image/jpeg;base64,/9j/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/yQALCAABAAEBAREA/8wABgAQEAX/2gAIAQEAAD8A0s8g/9k=","gradient":"midnight"} --> | ||
<div class="wp-block-cover has-background-dim" | ||
style="background-image:url(data:image/jpeg;base64,/9j/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/yQALCAABAAEBAREA/8wABgAQEAX/2gAIAQEAAD8A0s8g/9k=)"> | ||
<span aria-hidden="true" class="wp-block-cover__gradient-background has-midnight-gradient-background"></span> | ||
<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">Cover</p> | ||
<!-- /wp:paragraph --> | ||
</div> | ||
</div> | ||
<!-- /wp:cover --> |
33 changes: 33 additions & 0 deletions
33
packages/e2e-tests/fixtures/blocks/core__cover__deprecated-5.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,33 @@ | ||
[ | ||
{ | ||
"clientId": "_clientId_0", | ||
"name": "core/cover", | ||
"isValid": true, | ||
"attributes": { | ||
"url": "data:image/jpeg;base64,/9j/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/yQALCAABAAEBAREA/8wABgAQEAX/2gAIAQEAAD8A0s8g/9k=", | ||
"hasParallax": false, | ||
"dimRatio": 50, | ||
"backgroundType": "image", | ||
"title": "", | ||
"contentAlign": "center", | ||
"gradient": "midnight" | ||
}, | ||
"innerBlocks": [ | ||
{ | ||
"clientId": "_clientId_0", | ||
"name": "core/paragraph", | ||
"isValid": true, | ||
"attributes": { | ||
"align": "center", | ||
"content": "Cover", | ||
"dropCap": false, | ||
"placeholder": "Write title…", | ||
"fontSize": "large" | ||
}, | ||
"innerBlocks": [], | ||
"originalContent": "<p class=\"has-text-align-center has-large-font-size\">Cover</p>" | ||
} | ||
], | ||
"originalContent": "<div class=\"wp-block-cover has-background-dim\"\n\tstyle=\"background-image:url(data:image/jpeg;base64,/9j/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/yQALCAABAAEBAREA/8wABgAQEAX/2gAIAQEAAD8A0s8g/9k=)\">\n\t<span aria-hidden=\"true\" class=\"wp-block-cover__gradient-background has-midnight-gradient-background\"></span>\n\t<div class=\"wp-block-cover__inner-container\">\n\t\t\n\t</div>\n</div>" | ||
} | ||
] |
39 changes: 39 additions & 0 deletions
39
packages/e2e-tests/fixtures/blocks/core__cover__deprecated-5.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,39 @@ | ||
[ | ||
{ | ||
"blockName": "core/cover", | ||
"attrs": { | ||
"url": "data:image/jpeg;base64,/9j/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/yQALCAABAAEBAREA/8wABgAQEAX/2gAIAQEAAD8A0s8g/9k=", | ||
"gradient": "midnight" | ||
}, | ||
"innerBlocks": [ | ||
{ | ||
"blockName": "core/paragraph", | ||
"attrs": { | ||
"align": "center", | ||
"placeholder": "Write title…", | ||
"fontSize": "large" | ||
}, | ||
"innerBlocks": [], | ||
"innerHTML": "\n\t\t<p class=\"has-text-align-center has-large-font-size\">Cover</p>\n\t\t", | ||
"innerContent": [ | ||
"\n\t\t<p class=\"has-text-align-center has-large-font-size\">Cover</p>\n\t\t" | ||
] | ||
} | ||
], | ||
"innerHTML": "\n<div class=\"wp-block-cover has-background-dim\"\n\tstyle=\"background-image:url(data:image/jpeg;base64,/9j/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/yQALCAABAAEBAREA/8wABgAQEAX/2gAIAQEAAD8A0s8g/9k=)\">\n\t<span aria-hidden=\"true\" class=\"wp-block-cover__gradient-background has-midnight-gradient-background\"></span>\n\t<div class=\"wp-block-cover__inner-container\">\n\t\t\n\t</div>\n</div>\n", | ||
"innerContent": [ | ||
"\n<div class=\"wp-block-cover has-background-dim\"\n\tstyle=\"background-image:url(data:image/jpeg;base64,/9j/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/yQALCAABAAEBAREA/8wABgAQEAX/2gAIAQEAAD8A0s8g/9k=)\">\n\t<span aria-hidden=\"true\" class=\"wp-block-cover__gradient-background has-midnight-gradient-background\"></span>\n\t<div class=\"wp-block-cover__inner-container\">\n\t\t", | ||
null, | ||
"\n\t</div>\n</div>\n" | ||
] | ||
}, | ||
{ | ||
"blockName": null, | ||
"attrs": {}, | ||
"innerBlocks": [], | ||
"innerHTML": "\n", | ||
"innerContent": [ | ||
"\n" | ||
] | ||
} | ||
] |
5 changes: 5 additions & 0 deletions
5
packages/e2e-tests/fixtures/blocks/core__cover__deprecated-5.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":"data:image/jpeg;base64,/9j/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/yQALCAABAAEBAREA/8wABgAQEAX/2gAIAQEAAD8A0s8g/9k=","gradient":"midnight"} --> | ||
<div class="wp-block-cover has-background-dim has-background-gradient" style="background-image:url(data:image/jpeg;base64,/9j/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/yQALCAABAAEBAREA/8wABgAQEAX/2gAIAQEAAD8A0s8g/9k=)"><span aria-hidden="true" class="wp-block-cover__gradient-background has-midnight-gradient-background"></span><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">Cover</p> | ||
<!-- /wp:paragraph --></div></div> | ||
<!-- /wp:cover --> |