Opened 5 months ago
Last modified 4 months ago
#61750 new enhancement
Spacing issues since 6.6 (Gutenberg with Block- or Hybrid Themes)
Reported by: | dohu13 | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 6.6.1 |
Component: | General | Keywords: | needs-patch 2nd-opinion needs-testing |
Focuses: | css | Cc: |
Description
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.
Here is a screenshot of my testing site: http://test.lake-site.de/screenshot
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.
@dohu13 Thanks for reporting the issue. It sounds like the same one mentioned here - https://github.com/WordPress/gutenberg/issues/53468#issuecomment-2241279024.
Is that correct?
If so, I'm currently working on a fix for it here - https://github.com/WordPress/gutenberg/pull/63972.