WP 6.2 Gutenberg ul.has-background sometimes appears and sometimes doesn’t
-
In a site we are developing using Gutenberg blocks, with TT3 as the base theme, under WordPress 6.2, we have an oddity that we can’t quite figure out.
The top navigation across the entire site is identical (we believe), looking at the source code for the navigation, all the pages appear to be the same. The pages that work and the pages that don’t work are using the same template. However, on some pages we see this CSS in web developer tools and on same pages we do not:
ol.has-background, ul.has-background {
padding: 1.25em 2.375em;
}Doing a diff of the entire HTML navigation block between the good and bad page, shows no difference in the HTML.
I read here https://wordpress.org/support/topic/why-does-adding-background-color-also-add-padding/ today that Gutenberg blocks are attempting to be helpful by automatically adding padding if there is a background colour, which is fine also. And that article shows how to add code to functions.php to stop that behaviour.
I see no reason to completely stop this behaviour, but I would like to find out what is triggering the padding on same pages and not on others. Pretty certain after spending close to 2 hours today looking, that both pages have the same styling on the blocks.
Obviously I am missing something and am not sure where to look.
Any suggestions on what might be causing this discrepancy?
- You must be logged in to reply to this topic.