Global Styles: Fix Separator block color use #7927
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Trac ticket: https://core.trac.wordpress.org/ticket/62624
This PR brings the changes from the following Gutenberg PRs to core:
Description
Removes the old fudging of style declarations for Separator block styles in favour of a more robust and consistent approach within the theme.json revolver.
The Separator block styles are now tweaked within the theme.json resolver's
get_theme_dataandget_user_datamethods. This allows a subtle difference in handling based on the origin of the user data.Theme data (from theme.json) containing a background color style for the Separator block will now use that as a fallback for
color.textandborder.colorstyle paths. This allows the Separator block's different rendering approaches that rely on different CSS properties to use a consistent color.User origin data, such as a color selection made in Global Styless, is now enforced across the different color paths. This means the user's selection is now honoured regardless of which block style, and therefore rendering method the Separator block employs.
A more detailed breakdown and discussion can be found on the GB PR: WordPress/gutenberg#67269
Test Instructions
Screenshots
Before
Note the overlaid color on top of the user-selected yellow in the above screenshot. This is due to the theme's styles not being overridden for non-background properties on trunk.
After
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.