-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Gallery block does not respect opting out of base layout styles #47948
Comments
Thanks for reporting @cbirdsong. I am able to confirm in Twenty Twenty-One using WordPress 6.2 Beta 2 and the latest version of Gutenberg. |
I can confirm this is still an issue in WordPress 6.3. |
I can also confirm that the style is not applied to a hybrid theme (not FSE) on wp 6.4.3. "styles": {
"spacing": {
"blockGap": "0"
}
} The css variable .wp-block-gallery.wp-block-gallery-1 {
--wp--style--unstable-gallery-gap: var(--wp--style--gallery-gap-default, var(--gallery-block--gutter-size, var(--wp--style--block-gap, 0.5em)));
gap: var(--wp--style--gallery-gap-default, var(--gallery-block--gutter-size, var(--wp--style--block-gap, 0.5em)));
} I can correct this by applying : "styles": {
"blocks": {
"core/gallery": {
"css": "--wp--style--block-gap: 1rem"
}
}
} |
Description
The gallery block does not respect the ability to opt out of base layout styles via
add_theme_support( 'disable-layout-styles' );
.Step-by-step reproduction instructions
add_theme_support( 'disable-layout-styles' );
to a non-FSE theme..wp-block-gallery-10
and an accompanying<style>
block like this:Environment info
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: