diff --git a/packages/block-library/src/post-comments-form/index.php b/packages/block-library/src/post-comments-form/index.php index 94278333bc107c..0d61951c122460 100644 --- a/packages/block-library/src/post-comments-form/index.php +++ b/packages/block-library/src/post-comments-form/index.php @@ -46,3 +46,18 @@ function register_block_core_post_comments_form() { ); } add_action( 'init', 'register_block_core_post_comments_form' ); + +/** + * Use the button block classes for the form-submit button. + * + * @param array $fields The default comment form arguments. + * + * @return array Returns the modified fields. + */ +function gutenberg_comment_form_block_form_defaults( $fields ) { + $fields['submit_button'] = ''; + $fields['submit_field'] = '
'; + + return $fields; +} +add_filter( 'comment_form_defaults', 'gutenberg_comment_form_block_form_defaults' ); diff --git a/packages/block-library/src/post-comments-form/style.scss b/packages/block-library/src/post-comments-form/style.scss index 68a73d8174b803..331d50f90ac731 100644 --- a/packages/block-library/src/post-comments-form/style.scss +++ b/packages/block-library/src/post-comments-form/style.scss @@ -1,22 +1,9 @@ // Styles copied from button block styles. .wp-block-post-comments-form input[type="submit"] { - color: $white; - background-color: #32373c; border: none; - border-radius: 9999px; // 100% causes an oval, but any explicit but really high value retains the pill shape. box-shadow: none; cursor: pointer; display: inline-block; - font-size: 1.125em; - padding: 0.667em 1.333em; text-align: center; - text-decoration: none; overflow-wrap: break-word; - - &:hover, - &:focus, - &:active, - &:visited { - color: $white; - } }