-
Notifications
You must be signed in to change notification settings - Fork 819
Add fallback styles for dropdown block when css vars are not populated #43101
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
Add fallback styles for dropdown block when css vars are not populated #43101
Conversation
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 🔴 Action required: Please add missing changelog entries for the following projects: Use the Jetpack CLI tool to generate changelog entries by running the following command: Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Loving all the fixes, keep 'em coming 🚀
✅ Works for me for both field and form variation previews
✅ Couldn't break the default styling regardless of method of adding field, form variation, undo/redo, pasting etc.
LGTM 👍
b056968
into
update/migrate-form-fields-to-inner-blocks
Note - this PR merges into #42890 rather than trunk.
Proposed changes:
It was noted in #43096 (review) that often when dropdown field is shown in a preview, it's missing styles.
One of the reasons this happens is explained in #41418.
I noticed there's also another contributing factor that explains why this happens for the dropdown block but not the multiline/textarea block.
The latter has fallback values set in its CSS, while the former doesn't.
In this PR I'm also setting fallbacks for the dropdown, and it seems to mostly solve the preview problems, at least in situations where the theme isn't changing the styles of the form much.
Other information:
Does this pull request change what data or activity we track or use?
Testing instructions:
Expected: The block should have proper border styles and padding.
Screenshots
Before
After