Make WordPress Core

Opened 4 weeks ago

Closed 11 days ago

#62028 closed defect (bug) (invalid)

Paragraph margins not honored (in the backend) when global blockspacing is set to zero (new issue in 6.6.1)

Reported by: magicmallows's profile magicmallows Owned by:
Milestone: Priority: normal
Severity: normal Version: 6.6.1
Component: Editor Keywords: has-testing-info reporter-feedback
Focuses: Cc:

Description

I've had to rollback all my websites to version 6.5.5 due to a very annoying bug in 6.6.1:

I do not want automatic gaps between my elements so I have always had "BlockSpacing" set to 0 under "Layout" in the global styles... And only had top & bottom margins applied to my paragraphs & headings.
It has always worked perfectly this way, but since version 6.6.1 my paragraphs only have margins on the frontend and NOT on the backend when editing a page. When I downgraded my websites back to version 6.5.5 the issue was fixed.

Note: I tested this with a 100% clean wordpress install (no extra plugins added and default theme) and I was able to easily replicate the issue:
You just have to go to Site Editor and set blockspacing under Layout to "0", and add a margin to the paragraph block. After doing this the paragraph margins will work on the frontend and not in the backend when editing a page.

Change History (5)

#1 @hellofromTonya
3 weeks ago

Test Report

Environment

  • OS: macOS
  • Server: nginx
  • Localhost: Local
  • WordPress: 6.5.5, 6.6.1, and 6.6.2
  • PHP: 7.4.30
  • MySQL: 8.0.16
  • Theme: Twenty Twenty-Four (TT4)
  • Plugins: none

Steps to Reproduce or Test

  1. Go to Appearance > Editor.
  2. Open the Styles UI by clicking on the page and then the Styles icon in the top toolbar.
  3. Open the Layout UI.
  4. Change the Block Spacing to 0.
  5. Navigate back to the Styles UI.
  6. Open Blocks > Paragraph.
  7. Scroll down to the Margin. Open the Set Custom Size. Set 200 in the text box.
  8. Save the custom styles.
  9. Go to Pages > Add New Page and add multiple paragraphs (e.g 5 generic paragraphs to copy and paste).
  10. Notice the paragraph spacing 🐞 Reported bug should occur here.
  11. Back in the Site Editor, change the Styles > Blocks > Paragraph margin to another number such as 60.
  12. Refresh the Page editor. Notice the paragraph spacing. Did it change? 🐞 Reported bug should occur here.

Repea the tests on 6.5.5, 6.6.1, and 6.6.2 to note the differences.

Expected Results

When reproducing the reported bug:

  • ❌ The paragraph spacing should not change from the default after setting its margin in the Site Editor Styles > Blocks > Paragraph UI.

Actual Results

Results on 6.5.5, 6.6.1, and 6.6.2 were the same in my testing. The paragraph margin rendered as expected in the post and page editors.

Step 9-10 CSS:

:root :where(p) {
  margin-top: 200px;
  margin-bottom: 200px;
}

After changing it to 60, the CSS:

:root :where(p) {
  margin-top: 60px;
  margin-bottom: 60px;
}

I was not able to reproduce the reported bug on 6.5.5, 6.6.1, or 6.6.2.

Last edited 3 weeks ago by hellofromTonya (previous) (diff)

#2 @hellofromTonya
3 weeks ago

  • Component changed from General to Editor
  • Keywords has-testing-info reporter-feedback added
  • Milestone changed from Awaiting Review to 6.6.3

Hello @magicmallows,

Welcome to WordPress Core's Trac.

Thank you for providing the testing instructions. Very helpful.

I followed the instructions and tested on 6.5.5, 6.6.1, and 6.6.2. Per my test report comment:1, I was not able to reproduce the reported issue.

Can you please check my testing instructions and how I tested it to ensure I'm repeating what you did?

Also can you please test with 6.6.2 to see if the issue you're experiencing is resolved (as there were a number of CSS specificity fixes shipped in it)?

Moving into 6.6.3 for investigation. cc @vcanales.

#3 @noruzzaman
11 days ago

I have followed the instructions provided by @hellofromTonya and tested the issue on a Windows operating system. Everything works correctly in the current WordPress version 6.6.2. When I set the Global Block Spacing to 0 and applied a custom margin to the Paragraph block in the Global Styles, the paragraph margins work just as expected!

#4 @hellofromTonya
11 days ago

Thank you @noruzzaman for testing and confirming on a Windows machine.

#5 @hellofromTonya
11 days ago

  • Milestone 6.6.3 deleted
  • Resolution set to invalid
  • Status changed from new to closed

Hello @magicmallows,

With 2 contributors reporting not able to reproduce, the issue your site is experiencing appears to not be due to a Core bug.

Please note, this Trac is used for the development of the WordPress software itself, not for support or assistance with individual sites, themes, frameworks, or plugins.

You can find people who are able to assist with your site in the WordPress support forums.

I've closed this ticket as invalid, which is Trac's unfriendly term to indicate I've referred you to the support team.

Can you please check my testing instructions and how I tested it to ensure I'm repeating what you did?

However, if my testing steps are not correct or different, please share more information here and reopen this ticket. Thank you.

Note: See TracTickets for help on using tickets.