Skip to content
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

Navigation justification is broken #36402

Closed
DeoThemes opened this issue Nov 11, 2021 · 6 comments
Closed

Navigation justification is broken #36402

DeoThemes opened this issue Nov 11, 2021 · 6 comments
Labels
[Block] Navigation Affects the Navigation Block [Type] Bug An existing feature does not function as intended

Comments

@DeoThemes
Copy link

DeoThemes commented Nov 11, 2021

Description

After the recent update 11.9.0 navigation alignment is broken. No matter what alignment option is selected, the CSS variables are undefined

Step-by-step reproduction instructions

  1. Go to Editor (beta)
  2. Add navigation block
  3. Select justification option

Screenshots, screen recording, code snippet

gutenberg_1 19 0_justify_bug

Environment info

  • WordPress 5.8.2, Gutenberg 11.9.0
  • Chrome latest version
  • Ona WordPress theme

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

@annezazu annezazu added [Block] Navigation Affects the Navigation Block [Type] Bug An existing feature does not function as intended labels Nov 12, 2021
@annezazu
Copy link
Contributor

This seems to be an issue with the Tove theme specifically as I just tested with both TT1 block and Tove:

TT1 Blocks:

TT1.blocks.11.9.mov

Tove:

tove.nav.block.11.9.mov

I tried testing once more with Tove where there was more space for the navigation block to have but still found the same issue.

cc @andersnoren as a heads up and for your thoughts. Going to close this out for now but am happy to re-open if it's determined to be something with Gutenberg itself over theme implementation.

@DeoThemes
Copy link
Author

Apparently, it works only with TT1 Blocks now, all other themes are broken.

@annezazu
Copy link
Contributor

@tellthemachines In digging through the changelog for 11.9, it seems the likely cause is adding in flex layout: #36169 Would this change require updates on the theme side? Would love your thoughts here!

@tellthemachines
Copy link
Contributor

I can't reproduce it when adding a new menu, but it's a known issue for existing menus, and there's a fix waiting for review in #36432.

@DeoThemes
Copy link
Author

DeoThemes commented Nov 16, 2021

If I remove width: 100%, it works as intended
navbar_guten_bug

Fix for Gutenberg 11.9 justify content bug.

@media (min-width: 600px) {
  .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
    width: auto;
  }
}

@tellthemachines
Copy link
Contributor

Hmm, we need that width set to 100% otherwise space-between justification doesn't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Navigation Affects the Navigation Block [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

3 participants