-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Closed as not planned
Closed as not planned
Copy link
Labels
CSS StylingRelated to editor and front end styles, CSS-specific issues.Related to editor and front end styles, CSS-specific issues.[Block] NavigationAffects the Navigation BlockAffects the Navigation Block[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Description
If a theme defines a navigation block without any block gap defined, it should inherit the default block gap, and render that in the editor and the frontend. Since Gutenberg 16.7.0, the gap doesn't render in the editor.
Step-by-step reproduction instructions
- Start with a fresh site on the 2023 theme, without the Gutenberg plugin
- Go to
Appearance > Editor, and observe the navigation - Install and activate Gutenberg 16.7.
- Go back to
Appearance > Editorand observe the navigation.
Screenshots, screen recording, code snippet
In versions before 16.7.0, this css is being applied to the navigation in the editor
.wp-block-navigation .wp-block-page-list, .wp-block-navigation__container, .wp-block-navigation__responsive-close, .wp-block-navigation__responsive-container, .wp-block-navigation__responsive-container-content, .wp-block-navigation__responsive-dialog {
gap: inherit;
}And
.editor-styles-wrapper {
--wp--style--block-gap: 1.5rem;
}These are not present in Gutenberg 16.7.0. The frontend is unaffected in both cases.
Screenshot with Gutenberg 16.7

Please note that this is not observable if the theme specifies a custom block gap for the navigation block like this
<!-- wp:navigation {"layout":{"type":"flex","setCascadingProperties":true,"justifyContent":"right"},"style":{"spacing":{"blockGap":"1.5rem"}}} /-->
Environment info
- WP 6.3.1
- Gutenberg 16.7.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
capbussatfelipevelzani
Metadata
Metadata
Assignees
Labels
CSS StylingRelated to editor and front end styles, CSS-specific issues.Related to editor and front end styles, CSS-specific issues.[Block] NavigationAffects the Navigation BlockAffects the Navigation Block[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
