-
Notifications
You must be signed in to change notification settings - Fork 799
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
Site Editor Compatibility: Contact Form Block styling issues #19462
Comments
I'm not able to see this design issue in the site editor. Here it is in the footer: @andrewserong Was there anything specific you did here that caused the design to not load correctly? |
I have noticed that the textarea is not full width, and adjusting the field widths does not work correctly. Will fix this up. |
@apeatling this issue is primarily to do with the styling when rendered on the front end of the site with an FSE theme like TT1-blocks active. The form fields look okay within the editor but when rendered in a template part on the front end of the site, the block doesn’t include adequate CSS on its own for rendering the form fields in a pleasing way (padding, etc). It seems that up until this point the block has expected base CSS to be provided by the theme, which might not be the case with FSE themes. So, I was imagining that for this (and some of the other blocks) we might want to create some base / default styling for the front end styles in case they’re not provided by the theme. Eventually, perhaps using block supports would be better for more customisation, but safe defaults to start is probably enough. For the issue with the width of the message textarea within the editor, this is caused by the GB component we’re using being dependent on CSS-in-JS styles generated by Emotion not being copied over to the editor canvas (issue raised in: WordPress/gutenberg#30553). Since it sounds like there might not be a quick fix for that, I think it’d made sense to add CSS to the editor styles for this block to get it full width. |
Ah thanks. For some reason I thought the above was in the editor, I didn't check the front end yet. Will look into this more tomorrow. 👍 |
I'm asking the themes folks to see if TT1 and other block themes should have base form styles. It's strange to me that they would be included in the editor, but not the front end. Edit: My mistake -- asked in the channel and the editor styles are block provided. I wrote them! My memory needs a reboot. 😎 |
In the new site editor in Gutenberg (
/wp-admin/admin.php?page=gutenberg-edit-site
), there are some styling issues with the Contact Form block when rendered on the front end of the site.Steps to reproduce the issue
Related to: 256-gh-Automattic/view-design
What I expected
I expected the form to be rendered similarly to how it appears in the TwentyTwenty One theme, with comfortable padding in the text fields
What happened instead
Possible solution(s)
With themes moving in the direction of not providing CSS styles directly for blocks, should we update the Contact Form block to provide better default styling?
Screenshots
If applicable, add screenshots to help explain your problem.
The text was updated successfully, but these errors were encountered: