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 and mikachan committed Oct 4, 2023
1 parent fba6504 commit 2998442
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;
}

0 comments on commit 2998442

Please sign in to comment.