-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
When editing Styles > Layout or Block > * > Dimensions, every possible (and unnecessary) global setting is copied to custom styles #53868
Comments
Some further information that I hope will explain the issue. After some more testing it seems this is not restricted to global Styles > Layout. The issue also appears when making changes in the Dimensions panel of any block that supports dimensions (padding, margin, block spacing). Empty/default/reset global styles:
Edit Typography > Text > Font Size and Colors > Background:
As above but with edited Layout > Dimensions > Block Spacing.
But instead it is saved like this:
|
The issue is still present in WP 6.3.1 with or without Gutenberg active. I have been attempting to track down where this bug was introduced. Gutenberg 15.4.0 - is OK, no issue Without Gutenberg: So it looks like something was changed in the Gutenberg 15.5.0 release (possible that 15.5.1 introduced the error when fixing the other error in 15.5.0?) The bug in Gutenberg 15.5+ then made its way into WP core 6.3. I have attempted to understand where in the code this bug was introduced, but without any luck so far. When exporting child themes using either the plugin or the core exporter, this bug is causing all sorts of issues, with the potential for many more unanticipated issues. At the moment the only options we have are to:
|
Hi @jordesign When you added the labels, how/where is this done? |
Hey @Andrew-Starr - the adding of labels is something that members of the Gutenberg Triage Team have access to do when they look over issues - so it's not something you'll need to worry about 👍 |
Description
In the site editor, when making changes in Styles > Layout, it looks like every possible core block style and setting is copied and saved in the custom styles (wp_global_styles).
This results in a ton of unnecessary global styles and settings, such as default colors and default font sizes, even in a theme that has defined settings.color.defaultPalette as false for example.
As far as I can tell the only styles option that triggers this are the options in Styles > Layout.
I've tried other options such as Typography, Colors, and individual block settings, and they all seem to work as expected in that the only thing saved in the custom styles is the option being edited.
Possible related issues:
#53199
#52200
#51390
WordPress/create-block-theme#388
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
No response
Environment info
Twenty Twenty-Three theme
WP 6.3
Latest Gutenberg - issue present with both Gutenberg active and not active
No other plugins
Rolling back to WP 6.2.2 fixes the issue
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
The text was updated successfully, but these errors were encountered: