Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Block editor: Extra margins around List block items with Gutenberg 14.0.0 on some themes #43754

Closed
thekingsprojects opened this issue Sep 1, 2022 · 6 comments
Labels
[Block] List Affects the List Block

Comments

@thekingsprojects
Copy link

Description

In Gutenberg 14.0.0, when using a Classic/Customizer theme such as Twenty Twenty, items in a List block seem to have a lot of extra space around them when viewed in the editor. This space is not present when viewing the list on the live site.

At a glance, it looks like there are some margins being added above and below each item. For example:

.editor-styles-wrapper [data-block] {
  margin-top: 32px;
  margin-bottom: 32px;
}

That might well be intentional given the recent update to inner blocks, but thought I'd mention it since 32px seems to match the amount of extra space that's appearing.

(Not sure if this is related to the issue involving the width of content in the editor on Classic themes: #43752 I was asked to open this report separately just in case!)

Step-by-step reproduction instructions

  1. Install the latest version of Gutenberg (v14.0.0).
  2. Install and activate a Classic theme (Twenty Twenty, for example)
  3. Go to Posts → Add New.
  4. Add a List block to the page and start adding items to the list.
  5. Each new list item has a lot of additional space above and below it.
  6. Preview the page, or save and view it, and see that there is no additional space surrounding each item.

Screenshots, screen recording, code snippet

Screenshots taken with the WordPress.com Classic/Customizer theme Hever:

How the list looks in the editor :
list spacing editor hever

How the list looks on the live test site:
list spacing live hever

Environment info

  • WordPress 6.0.2
  • Gutenberg 14.0.0
  • MacOS 12.5.1
  • Firefox 103.0.2

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@priethor priethor added [Type] Bug An existing feature does not function as intended [Block] List Affects the List Block labels Sep 1, 2022
@ricjcs
Copy link

ricjcs commented Sep 2, 2022

I also have the same problem using the Aquene theme. The spacing between list items is the same as the spacing between paragraphs.

2022-09-02

This is happening with several classic themes. Two more examples: Dynamico theme and Donovan theme.

@syhussaini
Copy link

I just played into this ticket and wanted to check-in here for updates.
5522063-zen

@anuguywp
Copy link

anuguywp commented Sep 5, 2022

Just played into this ticket 5514682-zen and wanted to check-in here for updates.

@t-hamano
Copy link
Contributor

Thank you for your contribution.

I believe this issue should be resolved on the theme side.

The margins between blocks are probably implemented with a low level of detail, which is often the case. So, for example, the following CSS can be used to cancel the margins:

editor-styles-wrapper [data-type="core/list-item"] {
    margin: 0;
}

Some default themes are affected by this, and I think these should be addressed separately as needed.

@t-hamano t-hamano removed the [Type] Bug An existing feature does not function as intended label Oct 28, 2022
@ellatrix
Copy link
Member

See also #42526

@jordesign
Copy link
Contributor

I'm included to close this in favour of #42526 (mentioned above) which would also resolve this.

@jordesign jordesign closed this as not planned Won't fix, can't repro, duplicate, stale Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] List Affects the List Block
Projects
None yet
Development

No branches or pull requests

8 participants