#54781 closed defect (bug) (fixed)
WordPress default presets aren't loaded for all themes
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 5.9 | Priority: | normal |
Severity: | normal | Version: | 5.9 |
Component: | General | Keywords: | has-patch dev-reviewed commit close |
Focuses: | Cc: |
Description
The default preset styles of WordPress (font sizes, colors, gradients) are now provided via the global stylesheet to avoid duplication of styles. This stylesheet can be found in the front-end with the name global-styles-inline-css
.
The default presets are important to support old content that may use them and also patterns, that can use cross-theme styles.
Change History (9)
This ticket was mentioned in PR #2129 on WordPress/wordpress-develop by oandregal.
23 months ago
#1
- Keywords has-patch added
#4
@
23 months ago
- Owner set to jorgefilipecosta
- Resolution set to fixed
- Status changed from new to closed
In 52547:
oandregal commented on PR #2129:
23 months ago
#5
Related issue at https://core.trac.wordpress.org/ticket/54782
I have a fix for TwentyTwenty at https://github.com/WordPress/wordpress-develop/pull/2130 TwentyNineteen and TwentyTwentyone still need a patch.
#7
@
23 months ago
- Keywords close added
- Milestone changed from Awaiting Review to 5.9
Backported to the 5.9 branch.
oandregal commented on PR #2129:
23 months ago
#8
noisysocks commented on PR #2129:
23 months ago
#9
Thanks @oandregal!
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 https://github.com/WordPress/gutenberg/pull/35182 and https://github.com/WordPress/gutenberg/pull/34510) and are now provided by the global stylesheet, which is enabled to all themes as of https://github.com/WordPress/gutenberg/pull/34334Related devnote, see "Changes to the global stylesheet" section.
## How to test
global-styles-inline-css
.