Make the global stylesheet available for all themes #34328
Labels
Global Styles
Anything related to the broader Global Styles efforts, including Styles Engine and theme.json
[Status] In Progress
Tracking issues with work in progress
This issue is to describe why and how to make the global stylesheet available for all themes.
Why
theme.json
styles #34180 (comment)How
If the theme declares a theme.json it works as today.
If the theme doesn't declare a theme.json we will still enqueue some CSS: the core presets (needed by patterns) and the block styles defined via this new API. These are styles that we are now enqueuing via the block-library anyway. It's not a change of behavior, it's a change in the handle that contains these styles. We shouldn't enqueue the own theme presets declared in functions.php, though: themes that don't have a theme.json are supposed to do this themselves, and enqueuing ours can conflict with theme's styles.
The text was updated successfully, but these errors were encountered: