Archived topic
Bottom image margin gone after recent update
3 replies · Started by Teresa on November 8, 2022
After recent updates to both WP and GP, we lost the bottom margin on figure elements.
I've temporarily added a CSS rule to add back the 1em default that I think is in WP core, but I need to understand what happened so I don't do something that ends up getting overwritten with another update. It's an image heavy site, so any blog post would have a figure element in it that you can check out.
The zero margin on the element is coming from two different rules in this style sheet: https://vulkk.com/wp-content/themes/generatepress/assets/css/main.min.css?ver=3.2.1
Is there a way to globally set margins like this without custom CSS rules?
Also, can you please explain what happened with the updates that would have affected the bottom margin? I want to understand if there is anything I could do/have done to future-proof my work and prevent the client messaging me to tell me his site is slightly borked :/
Hi there,
WordPress 6.1 made some changes to their blocks coding methods without warning, which lead to some sites experiencing a loss of stlyes.
The fix for now is to use CSS:
figure {
margin-bottom: 1.5em;
}
We will be addressing this, if WP doesn't....
So annoying!
Thanks for your help, David. I've already added a CSS fix. Now we just wait for the WP core team's next move :D :P
Oh my, thanks for being so understanding. I wish they would stop changing things :)