-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed as not planned
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[Status] DuplicateUsed to indicate that a current issue matches an existing one and can be closedUsed to indicate that a current issue matches an existing one and can be closed[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Description
After unregistering a block style using unregisterBlockStyle, it remains as a variation that can be customized in the global style editor.
As a developer, I expect that unregistering a default block style should remove it from the global style editor. I view this as an issue because an admin using the global style editor may try to edit something that is not a feature of the theme.
Step-by-step reproduction instructions
- Unregister a core block style variation. (I used
core/button, outline) - Confirm that it does not appear as a variation in the block editor.
- Navigate to the global styles editor > Blocks > Button.
- You will see "Outline" as a variation that you can customize.
Screenshots, screen recording, code snippet
Below is the js snipped I used to unregister the block style.
domReady(function () {
unregisterBlockStyle('core/button', 'outline');
});Environment info
- WordPress 6.4.2
- Gutenberg 17.5.0
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
Reactions are currently unavailable
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[Status] DuplicateUsed to indicate that a current issue matches an existing one and can be closedUsed to indicate that a current issue matches an existing one and can be closed[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Type
Fields
Give feedbackNo fields configured for issues without a type.