Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove core/post-comments-form block styles that are overriding button element styles #42053

Merged
merged 13 commits into from
Jul 15, 2022
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/compat/wordpress-6.1/theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,9 @@
"fontFamily": "inherit",
"lineHeight": "inherit",
"textDecoration": "none"
},
"border": {
"width": "0"
}
},
"link": {
Expand Down
2 changes: 2 additions & 0 deletions packages/block-library/src/common.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import "./elements.scss";

// The following selectors have increased specificity (using the :root prefix)
// to assure colors take effect over another base class color, mainly to let
// the colors override the added specificity by link states such as :hover.
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/post-comments-form/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ const CommentsForm = () => {
name="submit"
type="submit"
className={ classnames(
'submit',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where else is this class? If it's not needed should we remove the directives as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't found the class anywhere else in Gutenberg codebase.
The CSS directives live in the WordPress core repo: https://github.com/WordPress/wordpress-develop/blob/0a17a80bccd452b91c3b63f71f010ba131a2c954/src/wp-admin/css/forms.css#L415-L421

'wp-block-button__link',
__experimentalGetElementClassName( 'button' )
) }
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/post-comments-form/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

// Styles copied from button block styles.
input[type="submit"] {
border: none;
box-shadow: none;
cursor: pointer;
display: inline-block;
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,3 @@
@import "./video/style.scss";

@import "common.scss";
@import "./elements.scss";