From cec7a6817ac2ec37e1e7a3b314fee0b909e7bd7d Mon Sep 17 00:00:00 2001 From: stacimc <63313398+stacimc@users.noreply.github.com> Date: Thu, 29 Apr 2021 11:15:16 -0700 Subject: [PATCH] Include margin in width calc for 100% button when it has sibling buttons (#29794) --- packages/block-library/src/button/style.scss | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/block-library/src/button/style.scss b/packages/block-library/src/button/style.scss index 2e0c50205a1cb7..65df1b3f0d5043 100644 --- a/packages/block-library/src/button/style.scss +++ b/packages/block-library/src/button/style.scss @@ -62,8 +62,12 @@ $blocks-block__margin: 0.5em; } &.wp-block-button__width-100 { - margin-right: 0; - width: 100%; + width: calc(100% - #{ $blocks-block__margin }); + + &:only-child { + margin-right: 0; + width: 100%; + } } }