The global stylesheet should be enqueued for all themes #2129
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Track ticket https://core.trac.wordpress.org/ticket/54781
For themes without theme.json support, we only enqueue the default styles provided by WordPress, such as the preset classes
(font sizes, colors, gradients). These classes should be always present as they may be used by old content and patterns.
For themes with theme.json support, we also enqueue the theme styles.
More context
In WordPress 5.8 the preset classes (font sizes, colors, gradients) were provided via a CSS stylesheet that we enqueued to all themes plus the global stylesheet for the themes that supported
theme.json
. To avoid this duplication, in WordPress 5.9 the preset classes were removed from the common stylesheet (see WordPress/gutenberg#35182 and WordPress/gutenberg#34510) and are now provided by the global stylesheet, which is enabled to all themes as of WordPress/gutenberg#34334Related devnote, see "Changes to the global stylesheet" section.
How to test
global-styles-inline-css
.