WordPress / twentytwentytwo

Twenty Twenty-Two, the default WordPress theme that will launch with WordPress 5.9.
404 stars 92 forks source link

Empty gaps seen in the site editor. #272

Closed paaljoachim closed 2 years ago

paaljoachim commented 2 years ago

Describe the bug I open the Site Editor and add a paragraph block. Add a black background color. Notice there is an empty space under the header.

To Reproduce Steps to reproduce the behavior:

  1. WP 5.9 beta 1. Go to Site Editor.
  2. Add a couple of paragraph blocks with a black background.
  3. Notice the large gap just below the header and the smaller gaps between the paragraph blocks.

Screenshot 2021-12-03 at 09 27 32

I assume the space is to give room for the inserter.

Just below the header. It takes too much space. Screenshot 2021-12-03 at 09 31 03

Expected behavior A much thinner gap below the header. Should be the same size as the other gaps between the below paragraph blocks.

Between the paragraph blocks. Screenshot 2021-12-03 at 09 30 49

Local test site running Desktop Server and Chrome.

kjellr commented 2 years ago

Thanks for the report. That spacing is intentional, and is applied within the Header template part. Controls to modify that spacing do not appear though, which is something we should fix upstream. I've opened a PR here:

https://github.com/WordPress/gutenberg/pull/37105

The only other weird bit is that it's a bit hard to discover that the margin is coming from within the template part block. When you select it, the margin sits outside the selection. I've opened https://github.com/WordPress/gutenberg/issues/37106 upstream to track that issue.

I suggest we leave this issue open until the first PR is resolved.

paaljoachim commented 2 years ago

@kjellr there is an associated issue here: Site Editor: Hide appender in non-empty documents https://github.com/WordPress/gutenberg/issues/36827

kjellr commented 2 years ago

Looks like we'll likely end up replacing that margin with a spacer block, but we'll need to wait for it to support custom units. 👍