Opened 21 months ago
Closed 21 months ago
#62480 closed enhancement (invalid)
Default Global Block spacing is annoying
| Reported by: | sergiogn | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Bundled Theme | Version: | 6.7 |
| Severity: | normal | Keywords: | has-screenshots |
| Cc: | Focuses: | ui, css |
Description
With the new release of the Twenty Twenty-Five Theme, I decided to use it and move from ACF to Gutenberg.
When creating a template, I wanted to use the title directly on a pattern block. So I created a page template and removed the h1 from the usual place and dragged to a block, more specificaly the 'Poster-like section', but I faced this issue: There is a global spacing between my navigation bar and my content.
I searched for how to remove the Block spacing, and found it quite easily, just head to the wp_global_styles page and under Layout set the Block Spacing to 0.
Ok, it removed the space between the navigation bar and the content, but now all spaces between links on the navigation bar, and between cta buttons are also 0.
I know, there is a way to add block-spacing on each block, but how time-consuming is that if I'm talking about hundreds of pages?
The css rule that is doing it is:
:where(.wp-site-blocks) > * {
margin-block-start: 1.2rem;
margin-block-end: 0;
}
I think the better solution would be to simply have a field on the content block (when editing the template, not the page) that I can remove the block-spacing or the margin if I want, without having to touch the global block-spacing.
Does that make sense? Am I missing something obvious that I should be doing? Please correct me if I'm wrong. Thank you!
Attachments (1)
Change History (6)
#1
@
21 months ago
Hi @sergiogn
Please use the support forum for this theme to ask questions about how to use it and edit it.
https://wordpress.org/support/theme/twentytwentyfive/
This ticket system is for reporting bugs and requesting features in WordPress. Not for general support.
#2
@
21 months ago
simply have a field on the content block (when editing the template, not the page) that I can remove the block-spacing
The spacing between the header template part, where the main navigation is, and the heading or title in the page is not added by block spacing.
Depending which template you are editing, the spacing is a top margin on the group that the title or heading block is placed inside.
I can't share more details than that since you did not mention which template exactly you are editing.
Select the group, for example using the list view or by clicking on the heading and then selecting its parent.
Then open the styles tab in the block settings sidebar.
Locate the Dimensions panel and adjust the top margin.
You would need to repeat this on every template you want to update, since this margin is part of the template design, not a global site wide setting.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
print screen of the space