Skip to content

Commit

Permalink
Fix left and right aligmnent in children of Post Template (#54997)
Browse files Browse the repository at this point in the history
* Fix left and right aligmnent in children of Post Template

* Add align center styles

* Fix image placeholder disappearing
  • Loading branch information
tellthemachines authored Oct 4, 2023
1 parent e6cd551 commit 99d5c7c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/block-library/src/post-featured-image/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,8 @@
}
}
}

&:where(.alignleft, .alignright) {
width: 100%;
}
}
20 changes: 20 additions & 0 deletions packages/block-library/src/post-template/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,23 @@
grid-template-columns: 1fr;
}
}

.wp-block-post-template-is-layout-constrained > li > .alignright,
.wp-block-post-template-is-layout-flow > li > .alignright {
float: right;
margin-inline-start: 2em;
margin-inline-end: 0;
}

.wp-block-post-template-is-layout-constrained > li > .alignleft,
.wp-block-post-template-is-layout-flow > li > .alignleft {
float: left;
margin-inline-start: 0;
margin-inline-end: 2em;
}

.wp-block-post-template-is-layout-constrained > li > .aligncenter,
.wp-block-post-template-is-layout-flow > li > .aligncenter {
margin-inline-start: auto;
margin-inline-end: auto;
}

1 comment on commit 99d5c7c

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 99d5c7c.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6401481703
📝 Reported issues:

Please sign in to comment.