From 9609fd0a615aeb78c3224e2b3d076a3cbf331672 Mon Sep 17 00:00:00 2001 From: jasmussen Date: Tue, 23 Jun 2020 09:01:42 +0200 Subject: [PATCH 1/3] Fix centered legacy button. Fixes #23291. --- packages/block-library/src/buttons/style.scss | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/block-library/src/buttons/style.scss b/packages/block-library/src/buttons/style.scss index a16c5e3e23faa..fbfdf5ea4111f 100644 --- a/packages/block-library/src/buttons/style.scss +++ b/packages/block-library/src/buttons/style.scss @@ -18,6 +18,16 @@ } } +.wp-block-buttons.alignleft .wp-block-button { + margin-left: 0; + margin-right: $grid-unit-10; + + &:first-child { + margin-right: 0; + } +} + +.wp-block-button.aligncenter, // This is to support the legacy Button block. .wp-block-buttons.aligncenter { text-align: center; } From 9c6f10f58bf94dcc66bc49b708771f3b9ac8926d Mon Sep 17 00:00:00 2001 From: jasmussen Date: Tue, 23 Jun 2020 12:26:30 +0200 Subject: [PATCH 2/3] Improve RTL. --- packages/block-library/src/buttons/style.scss | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/block-library/src/buttons/style.scss b/packages/block-library/src/buttons/style.scss index fbfdf5ea4111f..e6866a4494eb2 100644 --- a/packages/block-library/src/buttons/style.scss +++ b/packages/block-library/src/buttons/style.scss @@ -10,19 +10,25 @@ } .wp-block-buttons.alignright .wp-block-button { + /*rtl:ignore*/ margin-right: 0; + /*rtl:ignore*/ margin-left: $grid-unit-10; &:first-child { + /*rtl:ignore*/ margin-left: 0; } } .wp-block-buttons.alignleft .wp-block-button { + /*rtl:ignore*/ margin-left: 0; + /*rtl:ignore*/ margin-right: $grid-unit-10; &:first-child { + /*rtl:ignore*/ margin-right: 0; } } From 59df6bf1ff765c175bf1b81a425d2991ac42461d Mon Sep 17 00:00:00 2001 From: jasmussen Date: Tue, 23 Jun 2020 13:12:56 +0200 Subject: [PATCH 3/3] Address feedback. --- packages/block-library/src/buttons/style.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/block-library/src/buttons/style.scss b/packages/block-library/src/buttons/style.scss index e6866a4494eb2..670925d87f065 100644 --- a/packages/block-library/src/buttons/style.scss +++ b/packages/block-library/src/buttons/style.scss @@ -27,7 +27,7 @@ /*rtl:ignore*/ margin-right: $grid-unit-10; - &:first-child { + &:last-child { /*rtl:ignore*/ margin-right: 0; }