From 0b6fca5684f3e00f8a761a3f8290b3fae999b9ee Mon Sep 17 00:00:00 2001 From: tellthemachines Date: Tue, 3 Oct 2023 17:32:48 +1100 Subject: [PATCH 1/3] Fix left and right aligmnent in children of Post Template --- .../block-library/src/post-template/style.scss | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/packages/block-library/src/post-template/style.scss b/packages/block-library/src/post-template/style.scss index 00305a1712336..43cac9ea0e1a3 100644 --- a/packages/block-library/src/post-template/style.scss +++ b/packages/block-library/src/post-template/style.scss @@ -37,3 +37,17 @@ 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; +} From da0c49b742008e50cbc207d4c9ff5f4c40dd4b23 Mon Sep 17 00:00:00 2001 From: tellthemachines Date: Wed, 4 Oct 2023 13:18:35 +1100 Subject: [PATCH 2/3] Add align center styles --- packages/block-library/src/post-template/style.scss | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/block-library/src/post-template/style.scss b/packages/block-library/src/post-template/style.scss index 43cac9ea0e1a3..4af30e30b2309 100644 --- a/packages/block-library/src/post-template/style.scss +++ b/packages/block-library/src/post-template/style.scss @@ -51,3 +51,9 @@ 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; +} From c469ae3d6ded4137f73f4e9d8ba6920ebc6de59a Mon Sep 17 00:00:00 2001 From: tellthemachines Date: Wed, 4 Oct 2023 13:18:46 +1100 Subject: [PATCH 3/3] Fix image placeholder disappearing --- packages/block-library/src/post-featured-image/style.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/block-library/src/post-featured-image/style.scss b/packages/block-library/src/post-featured-image/style.scss index 4821e634b6032..e740b8c56e608 100644 --- a/packages/block-library/src/post-featured-image/style.scss +++ b/packages/block-library/src/post-featured-image/style.scss @@ -39,4 +39,8 @@ } } } + + &:where(.alignleft, .alignright) { + width: 100%; + } }