-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Allow plugins to include a theme.json file in the same way themes do #41707
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] ExtensibilityThe ability to extend blocks or the editing experienceThe ability to extend blocks or the editing experience[Type] TaskIssues or PRs that have been broken down into an individual action to takeIssues or PRs that have been broken down into an individual action to take
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] ExtensibilityThe ability to extend blocks or the editing experienceThe ability to extend blocks or the editing experience[Type] TaskIssues or PRs that have been broken down into an individual action to takeIssues or PRs that have been broken down into an individual action to take
Type
Fields
Give feedbackNo fields configured for issues without a type.
Description
Currently, if a plugin wants to set default styles for its blocks, it can either write the styles in CSS or write them in the block default attributes.
None of these approaches allow themes to easily override the styles of the plugin using
theme.json.A solution would be to allow plugins to include a
theme.jsonfile in the same way themes are already doing it. Styles specified in thetheme.jsonof a plugin, would have lower priority than the styles from the theme'stheme.jsonand user styles.This way, plugins can specify the default styles of their blocks in their
theme.jsonand themes can override the styles from theirtheme.json.Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes