Fixes styling issues in WordPress 5.9 modifying global styles code.
This plugin fixes styling issues introduced in WordPress 5.9.
WordPress 5.9 started applying !important
rule and is setting up CSS properties (CSS variables) within body
selector in its global styles code. This rises the global styles specificity and may override styles coming from themes and plugins. (For more info about this change check “Updates for Settings, Styles, and theme.json” article.)
Global Styles Mods plugin lowers the specificity of WordPress 5.9 global CSS styles by removing !important
rules and changing body
to :root
selector for setting up WordPress CSS properties (CSS variables).
It also enqueues the global styles early enough so your theme or plugin stylesheet have a better chance to override global styles with minimal effort.
The fix applied is coming from issue conversation in Gutenberg GitHub repository.
global-styles-mods
folder into the /wp-content/plugins/
directory.The plugin requires WordPress 5.9 to work.
Also, it works quietly behind the scenes and simply modifies WordPress global CSS styles code – check your website page source in the browser for comparison when plugin is active vs. when it’s inactive.
If you experienced issues with font sizes and/or colors after updating to WordPress 5.9, this plugin should fix them – that’s how you know the plugin is doing its magic.
Please see the changelog.md
file for details.