diff --git a/packages/block-library/src/button/style.scss b/packages/block-library/src/button/style.scss index a8f625b95c3923..faae459d5497e0 100644 --- a/packages/block-library/src/button/style.scss +++ b/packages/block-library/src/button/style.scss @@ -10,7 +10,6 @@ $blocks-block__margin: 0.5em; word-break: break-word; // overflow-wrap doesn't work well if a link is wrapped in the div, so use word-break here. box-sizing: border-box; height: 100%; - width: 100%; align-content: center; &.aligncenter { diff --git a/packages/block-library/src/buttons/style.scss b/packages/block-library/src/buttons/style.scss index e563f3957f3746..fa9c96aef1710b 100644 --- a/packages/block-library/src/buttons/style.scss +++ b/packages/block-library/src/buttons/style.scss @@ -82,6 +82,11 @@ $blocks-block__margin: 0.5em; font-size: inherit; } } + + // Needed to make the buttons stretch correctly in a vertical layout. + .wp-block-button__link { + width: 100%; + } } // Legacy buttons that did not come in a wrapping container. diff --git a/packages/block-library/src/post-comments-form/style.scss b/packages/block-library/src/post-comments-form/style.scss index 69e6420581cb2f..b400849ba83bdb 100644 --- a/packages/block-library/src/post-comments-form/style.scss +++ b/packages/block-library/src/post-comments-form/style.scss @@ -82,9 +82,4 @@ margin-left: 0.5em; } } - - // Override the 100% width derived from the Button block - input[type="submit"] { - width: auto; - } }