[wp-trac] [WordPress Trac] #62480: Default Global Block spacing is annoying

WordPress Trac noreply at wordpress.org
Tue Nov 19 20:59:48 UTC 2024


#62480: Default Global Block spacing is annoying
---------------------------+-----------------------------
 Reporter:  sergiogn       |      Owner:  (none)
     Type:  enhancement    |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  Bundled Theme  |    Version:  6.7
 Severity:  normal         |   Keywords:  has-screenshots
  Focuses:  ui, css        |
---------------------------+-----------------------------
 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!

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/62480>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list