-
swinggraphics
Custommizer > Typography > Body > Paragraph Margin adds this CSS to “generate-style-inline-css”:
p{margin-bottom:[value];}.entry-content > [class*="wp-block-"]:not(:last-child):not(.wp-block-heading){margin-bottom:[value];}
That is fine for the p tag, but way too specific for other blocks. That is the equivalent of 4 class names for the default margin of every block (other than headings). Defaults should have quite low specificity. This leads to the use of
!important
or redundant selectors in child themes to override GP for theme or plugin elements or to fix unexpected margins (on cover blocks and spacers, for example). -
Hi there,
You can use this snippet to remove the CSS:
add_filter( 'generate_do_wp_block_margin_bottom', '__return_false', 99 );
-
swinggraphics
Thanks!
-
No Problem 🙂
- You must be logged in to reply to this topic.