Skip to content

Make the global stylesheet available for all themes #34328

@oandregal

Description

@oandregal

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.

Metadata

Metadata

Assignees

Labels

Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Status] In ProgressTracking issues with work in progress

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions