-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Global Styles: consider loading user styles after theme styles #34141
Copy link
Copy link
Closed
Labels
Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.jsonAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Feature] ThemesQuestions or issues with incorporating or styling blocks in a theme.Questions or issues with incorporating or styling blocks in a theme.[Status] In ProgressTracking issues with work in progressTracking issues with work in progress
Metadata
Metadata
Assignees
Labels
Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.jsonAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Feature] ThemesQuestions or issues with incorporating or styling blocks in a theme.Questions or issues with incorporating or styling blocks in a theme.[Status] In ProgressTracking issues with work in progressTracking issues with work in progress
Type
Fields
Give feedbackNo fields configured for issues without a type.
Description
Currently styles load in the following order:
global-styles-inline-cssFor example, this is from emptytheme:
This loading order can cause unexpected behavior when the theme wants to specify some defaults that are not entirely possible via theme.json, but still allow for user styles to take precedence. For an example of where this can create unexpected behavior, see Automattic/themes#4435
What is your proposed solution?
Within global styles, it could be useful to separate user styles from the core + theme.json styles. This way, the loading order could be: