Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the global stylesheet available for all themes #34328

Closed
oandregal opened this issue Aug 26, 2021 · 1 comment · Fixed by #34334
Closed

Make the global stylesheet available for all themes #34328

oandregal opened this issue Aug 26, 2021 · 1 comment · Fixed by #34334
Assignees
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

Comments

@oandregal
Copy link
Member

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.

@oandregal oandregal added the Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json label Aug 26, 2021
@oandregal oandregal self-assigned this Aug 26, 2021
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Aug 26, 2021
@oandregal
Copy link
Member Author

I have a PR for this at #34334 in case anyone is able to provide a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant