-
Anonymous
Hello!
I recently created new image Global Styles to set things like alignment and margins on images and have this reflected in the editor.
I then went through my site and updated my images to use these new styles. Most of them I had to convert from WP image blocks to GenerateBlocks. I ensured that local styles were cleared.
After that, I went into the Customizer and removed the CSS I was using to control the attributes previously.
However, when I published the changes and cleared the caches, it seems that:
– Image padding/margins are not inheriting from the Global Styles, so I had to add this back in using the Customizer for now
– Caption (headline) padding and margins ARE inheriting from the Global Styles as intended, which is great
– Image alignment is NOT being inherited from the Global Styles
– Both padding/margins and alignment look correct while in the editor but NOT on the published pagesActually, when I inspect the page, I can see that the Global Styles are being applied to the “img” but not the “figure” class above it, and only when I test the Global Style as a figure attribute does it look correct.
I’m a bit out of my depth. 😅 Is there a way to resolve this neatly, either with CSS or php?
-
Hi there,
This is a known bug for GB image block, we’re re-building the image block currently, but it takes more time than we expected. Sorry for the inconvenience.
For now, we can help with CSS solutions, can you provide an admin login so that I can see the global style settings?
-
Anonymous
Oof, so not an issue that just affects me. That’s good to know! 😅 Dropped some login details into the private info section.
-
Try this CSS, the
gb-image-84343f3c
is the global style class..gb-block-image:has(.gb-image-84343f3c) { text-align: center; }
-
Anonymous
Makes sense and seems to resolve the issue for now. Thank you!
-
You are welcome! Sorry for your inconvenience regarding the bug.
- You must be logged in to reply to this topic.