Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Use a specific CSS class for the CSS reset mixin. #16856
After #14509, the CSS rules for form controls target also the metaboxes area, conflicting with styles provided by plugins.
See for example Yoast/wordpress-seo#13316
For now, the new form controls styles are used only in Gutenberg. Eventually, when these styles will be used in core, WordPress would expect plugins to honor the new styles but their CSS selectors would need to have a lower specificity.
In fact, WordPress styles form controls using CSS selectors with a relatively low specificity. For example:
Once the new form controls styles will be in core, this problem will go away. For now, I'd like to propose to reinforce the principle that Gutenberg should do its best to not create conflicts with CSS provided by plugins.
This PR seeks to better scope the
Open to better naming for the new CSS class, of course.
Last commit should cover the points above.
I'd tend to think the "reset" for
Aug 2, 2019
@senadir I think the resets should be eliminated, this pattern is not that different it makes the component depend on a global style. Ideally, this is applied to each component so when a user loads the component in its own application, it works without requiring global resets.