How to change default block styles or attributes in Gutenberg? – WPMC Behavior & Heatmap WP Help DesK
Sintaramon-wordpress
Sintaramon-wordpress

How to change default block styles or attributes in Gutenberg?

Hello, I’d like to modify the default padding and colors of core blocks (like Group and Columns). Is there a recommended way to do this without editing core files — maybe through a theme.json or filter?

1comments

Leave a Comment

JPEG,PNG,WebP, up to ~2MB each

Comments

  • McWrise
    McWrise

    I’ve actually created my own plugin that adds some extra settings to a few of the core blocks.
    It makes the Columns block fixed so the columns don’t wrap to the next line when the screen is resized, and it also lets me set the exact padding I want.
    It doesn’t look perfect yet, but I’m still improving it. Once it looks good, I’ll share it here.

    In fact, you could even ask ChatGPT to generate something similar.

    Comment image #1Comment image #2