This issue is to describe why and how to make the global stylesheet available for all themes.
Why
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.
This issue is to describe why and how to make the global stylesheet available for all themes.
Why
theme.jsonstyles #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.