Skip to content

Commit

Permalink
Cover: Add missing align support to deprecation (#28796)
Browse files Browse the repository at this point in the history
  • Loading branch information
sirreal authored and oandregal committed Feb 11, 2021
1 parent bbb9934 commit 619d9f9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions packages/block-library/src/cover/deprecated.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ const deprecated = [
type: 'string',
},
},
supports: {
align: true,
},
save( { attributes } ) {
const {
backgroundType,
Expand Down Expand Up @@ -219,6 +222,9 @@ const deprecated = [
type: 'string',
},
},
supports: {
align: true,
},
save( { attributes } ) {
const {
backgroundType,
Expand Down Expand Up @@ -322,6 +328,9 @@ const deprecated = [
type: 'string',
},
},
supports: {
align: true,
},
save( { attributes } ) {
const {
backgroundType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"isRepeated": false,
"minHeight": 48,
"minHeightUnit": "vw",
"className": "alignfull"
"align": "full"
},
"innerBlocks": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<!-- /wp:paragraph --></div></div>
<!-- /wp:cover -->

<!-- wp:cover {"url":"https://example.com/some-background-image.png","id":1933,"dimRatio":0,"focalPoint":{"x":"0.50","y":"0.40"},"minHeight":48,"minHeightUnit":"vw","className":"alignfull"} -->
<!-- wp:cover {"url":"https://example.com/some-background-image.png","id":1933,"dimRatio":0,"focalPoint":{"x":"0.50","y":"0.40"},"minHeight":48,"minHeightUnit":"vw","align":"full"} -->
<div class="wp-block-cover alignfull" style="min-height:48vw"><img class="wp-block-cover__image-background wp-image-1933" alt="" src="https://example.com/some-background-image.png" style="object-position:50% 40%" data-object-fit="cover" data-object-position="50% 40%"/><div class="wp-block-cover__inner-container"><!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph --></div></div>
Expand Down

0 comments on commit 619d9f9

Please sign in to comment.