This issue describes what it entails to land the "Global Styles" project in WordPress core. The project has two main functions: 1) allows themes to control the editor settings via theme.json, and 2) creates a mechanism that coordinates core, theme, and user styles.
- Control editor settings: to land as part of 5.7.
- Style mechanism: while it works without a UI (this is, without user styles), the plan is to land this part paired with the UI (sidebar at edit-site) to make sure the underlying APIs match the UI needs.
Tasks
Affected files
- lib/editor-settings.php => land
gutenberg_get_common_block_editor_settings so other editors don't need to repeat the same logic.
- lib/experimental-theme.json => land the parts of it that affect settings.
- lib/class-wp-theme-json.php => land the parts of it that affect settings.
- lib/class-wp-theme-json-resolver.php => land the parts of it that affect settings. e.g.: do not expose user-origin methods as that something that only makes sense for styles at the moment.
- lib/global-styles.php => land
gutenberg_experimental_global_styles_settings (but only the settings logic, not the styles)
- phpunit/class-wp-theme-json-test.php => land the tests related to settings and schema validation.
- phpunit/class-wp-theme-json-legacy-settings-test.php => to be paired with lib/global-styles.php
This issue describes what it entails to land the "Global Styles" project in WordPress core. The project has two main functions: 1) allows themes to control the editor settings via theme.json, and 2) creates a mechanism that coordinates core, theme, and user styles.
Tasks
globalinto*androot. Update theme.json: split global block selector into root and defaults #28533Affected files
gutenberg_get_common_block_editor_settingsso other editors don't need to repeat the same logic.gutenberg_experimental_global_styles_settings(but only the settings logic, not the styles)