• dohu13

    (@dohu13)


    Since version 6.6, all specific block spacings i’ve been setting in my theme.json file are ignored. For example, I defined my own margin for h2, which is now overwritten by the general BlockGap spacing. This code from the WordPress core seems to overwrite everything:

    .is-layout-constrained > *,
    .is-layout-flow > * {
    margin-block-start: 3rem;
    margin-block-end: 0;
    }

    In my theme.json i defined:
    blockGap: 3rem (for general)
    and h2 for example: margin: 2.5rem 0 2.5rem 0;

    The margin, I defined for h2 are now overwritten by the margin-block-start (and end) commands.

    Can someone tell me why does that happen now? I have this problem on all my client sites with different themes now.

    • This topic was modified 4 months ago by dohu13.
    • This topic was modified 4 months ago by dohu13.
    • This topic was modified 4 months ago by dohu13.
Viewing 2 replies - 1 through 2 (of 2 total)
  • khalid4321

    (@khalid4321)

    can you more explain your spacing related problem

    Thread Starter dohu13

    (@dohu13)

    Sorry, i’ve clicked on the submit button too fast. ?? See my description above.

    Here is a screenshot of my testing site

    As you can see, my own margin for h2 (defined in theme.json) is now overwritten by wordpress margin-block-start and margin-block-end taken from the BlockGap general settings (3rem) in theme.json. This happening now with all blocks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.