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 Submenu] Gutenberg 18.1 reduced specificity breaks styles #9

Open
justintadlock opened this issue Apr 9, 2024 · 1 comment
Assignees
Labels
🐛 Bug I installed this, and now my website is broken. WordPress Issue Whatcha doin' to me WordPress/Gutenberg?

Comments

@justintadlock
Copy link
Contributor

justintadlock commented Apr 9, 2024

Spacing, specifically padding in this case, defined for core/navigation-submenu is broken when using Gutenberg 18.1. This PR reduces the specificity of the global styles selector, wrapping everything in :where():

To be fair, the PR in and of itself isn't the issue. The primary problem is the specificity of the Core Navigation block styles zeroing out spacing with a higher specificity: https://github.com/WordPress/gutenberg/blob/trunk/packages/block-library/src/navigation/style.scss#L13-L30

Block library style updates were in included in this PR, but the Navigation block was not included:

Solution

If this is not addressed in Gutenberg/Core before the WP 6.6 release, we'll need to create a settings.custom property to customize the spacing for Navigation Submenu and tie it into a stylesheet with a higher specificity. Users won't be able to customize it globally, but that's par for the course getting this theme to work with the block system.

@justintadlock justintadlock added 🐛 Bug I installed this, and now my website is broken. WordPress Issue Whatcha doin' to me WordPress/Gutenberg? labels Apr 9, 2024
@justintadlock justintadlock self-assigned this Apr 9, 2024
@justintadlock justintadlock changed the title [Navigation Submenu] Gutenberg 18.1 reduced specificity breaks spacing [Navigation Submenu] Gutenberg 18.1 reduced specificity breaks styles Apr 10, 2024
@justintadlock
Copy link
Contributor Author

It looks like it at least breaks background and text color styles defined in theme.json too. Needs further investigation.

justintadlock added a commit that referenced this issue May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug I installed this, and now my website is broken. WordPress Issue Whatcha doin' to me WordPress/Gutenberg?
Projects
None yet
Development

No branches or pull requests

1 participant