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

Changing background color of header or paragraph block causes extra padding to be added #65506

Open
2 tasks done
rwwwwwr opened this issue Sep 20, 2024 · 1 comment
Open
2 tasks done
Labels
[Block] Heading Affects the Headings Block [Block] Paragraph Affects the Paragraph Block Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Bug An existing feature does not function as intended

Comments

@rwwwwwr
Copy link

rwwwwwr commented Sep 20, 2024

Description

PROBLEM: Changing the background color of a paragraph or header block causes extra padding to be added to the element.

EXPECTED RESULT: Changing the background color of the block does NOT change the dimensions/padding/margins of the block, only changes the background color.

NOTE: This affects both the editor and is also saved and becomes live when the page is saved.

Step-by-step reproduction instructions

  • Open a new wordpress playground (also works on the local install I have of 6.6.2)
  • Click "Edit site"
  • Click on a header or paragraph block
  • Click on the "Settings" right button to show the right-side-menu
  • In the "Block" tab, under "Color", click "Background" (default is unset)
  • Change color to any color or gradient. Note the text block has now grown in size due to added padding
  • Remove background color by hitting "clear" and see text block returns to normal size.

Screenshots, screen recording, code snippet

paddingIssue

Environment info

Wordpress 6.6.2; Microsoft Edge Browser; Occurs in both locally hosted WP 6.6.2 and fresh version on playground

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
@rwwwwwr rwwwwwr added the [Type] Bug An existing feature does not function as intended label Sep 20, 2024
@colorful-tones colorful-tones added [Block] Heading Affects the Headings Block [Block] Paragraph Affects the Paragraph Block Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json labels Sep 20, 2024
@rwwwwwr
Copy link
Author

rwwwwwr commented Sep 20, 2024

Just to add, I was able to get a workaround on this. It seems that the padding/margin options, when first enabled, show "zero", but in reality are unset. If you change the padding/margin options and then reduce them back to zero, I get the desired layout I was expecting.

paddingIssue2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Heading Affects the Headings Block [Block] Paragraph Affects the Paragraph Block Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

2 participants