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

Comments form submit button styles overrides shadows from theme.json #63767

Closed
2 tasks done
carolinan opened this issue Jul 20, 2024 · 2 comments · Fixed by #63790
Closed
2 tasks done

Comments form submit button styles overrides shadows from theme.json #63767

carolinan opened this issue Jul 20, 2024 · 2 comments · Fixed by #63790
Assignees
Labels
[Block] Post Comments Form Affects the Comments Form Block [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@carolinan
Copy link
Contributor

Description

The submit button in the comments form block has CSS that overrides box-shadow set in theme.json styles.elements.button.shadow. The shadow from theme.json is not visible, making it inconsistent with other buttons.

.wp-block-post-comments-form input[type=submit] {
    box-shadow: none;
    ...
}
:root :where(.wp-element-button, .wp-block-button__link) {
    box-shadow: var(--wp--preset--shadow--extra-small);
}

Source: https://github.com/WordPress/gutenberg/blob/trunk/packages/block-library/src/post-comments-form/style.scss#L42

Step-by-step reproduction instructions

Add a shadow to styles.elements.button.shadow.
Add a comments form block, and confirm if the shadow is applied to the submit button.

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes
@carolinan carolinan added [Type] Bug An existing feature does not function as intended [Block] Post Comments Form Affects the Comments Form Block labels Jul 20, 2024
@aaronrobertshaw aaronrobertshaw self-assigned this Jul 21, 2024
@aaronrobertshaw
Copy link
Contributor

I can replicate this issue.

Similar to #63769, the problematic style here pre-dates both the ability to style button elements and the addition of shadow support to theme.json.

I'll sort out a fix for this alongside #63769 shortly.

@aaronrobertshaw
Copy link
Contributor

The other post comments form block styles look okay to me. I've put up a fix for this in #63790.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Post Comments Form Affects the Comments Form Block [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants