-
Notifications
You must be signed in to change notification settings - Fork 826
Contact form: lower specificity in the editor to match the frontend #44802
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
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 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! |
Code Coverage SummaryThis PR did not change code coverage! That could be good or bad, depending on the situation. Everything covered before, and still is? Great! Nothing was covered before? Not so great. 🤷 |
Please feel free to ask reviews from Zap team (and "jetpack-forms" on Slack) when you want more eyes on this. Zenith team might also be interested to take a look as they recently solved too high specificity issues in Forms. Thanks! |
&::placeholder { | ||
opacity: 0.5; | ||
} |
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.
This also aligns with the frontend styles. I couldn't see a reason why it had to be styled differently
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.
In my testing it worked well.
I noticed some discrepancies between textarea and the regular text input.
between the editor and the frontend view. But they are there in trunk already.
From my testing this change seems safe to make.
The frontend has a 0,0,0 specificity for the CSS that can be changed by the user, whereas the editor has a 0,1,0. This is not a problem today, but it will be an issue when WordPress/gutenberg#70378 gets merged. The GB PR aims to add the ability to style inputs via the elements API with theme.json. It works out of the box for Jetpack with the current styles but only in the frontend, the editor is still too specific. This PR aligns the two so it will work when the GB changes land.
Frontend:
Editor:
Proposed changes:
Maintained the same selectors but moved the
:where()
to encase all of it instead of partially to fit the specificity requirementOther information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions:
If possible, test with the GB PR active too: