Fixes WordPress 5.9 global CSS styles specificity issues

Overview
=== Global Styles Mods - WordPress 5.9 fix ===
Contributors:      webmandesign
Author URI:        https://www.webmandesign.eu
Plugin URI:        https://github.com/webmandesign/global-styles-mods
Donate link:       https://www.webmandesign.eu/contact/#donation
Requires at least: 5.9
Tested up to:      5.9
Requires PHP:      7.0
Stable tag:        1.0.0
License:           GNU General Public License v3
License URI:       http://www.gnu.org/licenses/gpl-3.0.html
Tags:              global styles, fix, Gutenberg, wp5.9, font size, colors

Fixes styling issues in WordPress 5.9 modifying global styles code.


== Description ==

= Plugin's purpose =

This plugin fixes styling issues introduced in WordPress 5.9.

= 
  
  👍
 
  When to use this plugin =

-  Your WordPress is of version 5.9 or newer
-  You are using a theme that supports block editor (Gutenberg) features such as preset font sizes and color palette
-  Your theme does not support [full site editing (FSE) feature](https://wordpress.org/news/2022/01/josephine/) (from [conversation about reported issues](https://github.com/WordPress/gutenberg/issues/38252) it seems they affect Gutenberg-ready themes only and FSE themes should be fine)
-  You experience font size or color issues on your website after WordPress 5.9 update
-  Your theme has not been updated to fix these issues

=  When NOT to use this plugin =

- You are not using WordPress 5.9 or newer
- Your theme was updated and is fixing the issues
- Your theme does not support block editor features (such as preset color palette or font sizes)
- Your theme is [full site editing (FSE) ready](https://wordpress.org/news/2022/01/josephine/)
- You don't experience any font size or color issues on your website after updating to WordPress 5.9

= Technical info =

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](https://make.wordpress.org/core/2022/01/08/updates-for-settings-styles-and-theme-json/#changes-to-the-global-stylesheet).)

**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](https://github.com/WordPress/gutenberg/issues/38252#issuecomment-1024348024).


== Installation ==

1. Unzip the plugin download file and upload `global-styles-mods` folder into the `/wp-content/plugins/` directory.
2. Activate the plugin through the *"Plugins"* menu in WordPress.
3. Plugin has no options and works immediately after activation. The plugin requires WordPress of version 5.9 to run. 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 working.


== Frequently Asked Questions ==

= It does not work, help! =

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.


== Screenshots ==

1. Issues with font sizes after WordPress 5.9 update.


== Changelog ==

Please see the [`changelog.md` file](https://github.com/webmandesign/global-styles-mods/blob/master/changelog.md) for details.


== Upgrade Notice ==

= 1.0.0 =
Initial release.
You might also like...
A tool to automatically fix Twig Coding Standards issues

Twig CS Fixer Installation This standard can be installed with the Composer dependency manager. Add the coding standard as a dependency of your projec

A Kimai 2 plugin, which send duration of cards to GitLab spend issues of timesheet.
A Kimai 2 plugin, which send duration of cards to GitLab spend issues of timesheet.

GitLabBundle A Kimai 2 plugin, which send duration of cards to GitLab spend issues of timesheet. Installation First clone it to your Kimai installatio

Plugin to diagnose/fix ClassicPress SSL issues.
Plugin to diagnose/fix ClassicPress SSL issues.

ClassicPress SSL Fix This plugin provides a way to work around the issue "cURL error 60: SSL certificate problem: certificate has expired" in ClassicP

Analyzer of PHP code to search issues with deprecated functionality in newer interpreter versions.

PhpDeprecationDetector PhpDeprecationDetector - analyzer of PHP code to search usages of deprecated functionality in newer interpreter versions - depr

List of Magento extensions with known security issues.
List of Magento extensions with known security issues.

Magento Vulnerability Database List of Magento 1 and 2 integrations with known security issues. Objective: easily identify insecure 3rd party software

Analyzer of PHP code to search issues with deprecated functionality in newer interpreter versions.

PhpDeprecationDetector PhpDeprecationDetector - analyzer of PHP code to search usages of deprecated functionality in newer interpreter versions - depr

A tool to automatically fix PHP Coding Standards issues
A tool to automatically fix PHP Coding Standards issues

PHP Coding Standards Fixer The PHP Coding Standards Fixer (PHP CS Fixer) tool fixes your code to follow standards; whether you want to follow PHP codi

Super simple share buttons for WordPress. No images, no css, no javascript

Developer Share Buttons A super lightweight social sharing solution using either the Web Share API or simple sharing links. Description A simple, cust

⚙️ A WordPress plugin to set WordPress options from a .env file.

dotenv A WordPress plugin to set WordPress options from a .env file. Any WPENV_ prefixed variables in the .env will be used to override the WordPress

Comments
  • Zero body margin is being removed

    Zero body margin is being removed

    Many thanks for creating this plugin. I really appreciate what this is trying to accomplish.

    I noticed that the zero margin on the body element is being removed.

    The result of this is that the browser adds its own default margin around the body, resulting in full-width blocks not going full wide, and blocks that a user may want to extend to the top/bottom (e.g. header or footer) appearing with spacing above/below.

    Would it be possible to add an exception to the body { margin: 0; } being converted to :root { margin: 0; }?

    opened by Andrew-Starr 3
Owner
Oliver Juhas
Providing accessibility ready, easy to use WordPress themes.
Oliver Juhas
Performance fixes for magento 2 core.

magento2-performance-fixes Performance fixes for magento 2 core. Problem and solution's concept - briefly PHP / Magento doesn't support concurency req

Mariusz Łopuch 48 Dec 30, 2022
PHP Class Encoding featuring popular Encoding::toUTF8() function --formerly known as forceUTF8()-- that fixes mixed encoded strings.

forceutf8 PHP Class Encoding featuring popular \ForceUTF8\Encoding::toUTF8() function --formerly known as forceUTF8()-- that fixes mixed encoded strin

Sebastián Grignoli 1.6k Dec 22, 2022
YesilCMS is based on BlizzCMS and specifically adapted for VMaNGOS Core and includes new features and many bug fixes.

YesilCMS · YesilCMS is based on BlizzCMS and specifically adapted for VMaNGOS Core and includes new features and many bug fixes. Features In addition

yesilmen 12 Jan 4, 2023
Silverstripe-tinytidy - Control which styles are available in TinyMCE's style dropdown menu and what elements they can be applied to

TinyTidy for SilverStripe This module mainly serves as an example of how to customise the 'styles' dropdown menu in the TinyMCE editor to control whic

Jono Menz 30 Jul 30, 2020
Foundation 3 Framework for Magento 1.7. Foundation styles and libraries. Magento Responsive theme. Off-canvas Left-Right sidebar columns for mobile.

Magento Foundation 3 Framework Zurb Foundation 3 framework for Magento 1.7. Magento Foundation 3 Version 1.3.0. Demo page: http://magendation.internet

Nando Boronat 62 Apr 1, 2022
🪃 Zero-dependency global `kirbylog()` helper for any content

Kirbylog The most simple, Kirby-esque way to log content to file. Most of the time, I just want to log some string or array to a file. That's what thi

Johann Schopplich 11 Nov 9, 2022
An Elasticsearch engine plugin for Moodle's Global Search

Moodle Global Search - Elasticsearch Backend This plugin allows Moodle to use Elasticsearch as the search engine for Moodle's Global Search. The follo

Catalyst IT 12 Nov 3, 2022
Packet-driven global form interaction-spam blocker for PM.

Looking for testers and README improvers! Form Interaction Fix Interaction-spam Interaction spam is often a problem for players who use the mouse as t

EndermanbugZJFC 5 Dec 16, 2022
Tailwind UI is a Tailwind CSS component library designed by the authors of Tailwind CSS

Tailwind UI is a Tailwind CSS component library designed by the authors of Tailwind CSS. This is a Winter CMS plugin that provides a custom, TailwindUI-based skin for the backend.

Winter CMS 9 Dec 19, 2022
Issue tracking application extending GitHub's issues and pull requests for the Joomla! project.

Requirements The issue tracker application requires a server running: PHP 7.2 or 7.3 PHP's ext/curl and ext/intl should also be installed MySQL 5.5.3

Joomla! 68 Oct 27, 2022