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

FSE Round 3 Alpha test - Applying Background Color to Heading Block affects the width of text area. #51939

Closed
devNigel opened this issue Apr 14, 2021 · 3 comments
Labels
[Goal] Full Site Editing [Pri] Normal Schedule for the next available opportuinity. [Type] Bug When a feature is broken and / or not performing as intended

Comments

@devNigel
Copy link

Steps to reproduce the behavior

  1. Add a Heading Block.
  2. Enter some text/
  3. Apply Background Color to the Heading Block.
  4. The width of the text area is affected.

What I expected to happen

Applying Background Color should not affect the width of the text area

What actually happened

The width of the text area was changed.

Screenshot / Video: If applicable, add screenshots to help explain your problem.

https://d.pr/i/oUNcye

@devNigel devNigel added the [Type] Bug When a feature is broken and / or not performing as intended label Apr 14, 2021
@jeyip jeyip added the [Pri] Normal Schedule for the next available opportuinity. label Nov 6, 2021
@jeyip
Copy link
Contributor

jeyip commented Nov 6, 2021

Can reproduce this on dotcom simple sites and core Gutenberg, although it only affects the editor and not the frontend. I think priority should be normal or low because of this.

@creativecoder @zaguiini

@jeyip
Copy link
Contributor

jeyip commented Nov 17, 2021

I did some digging, and it appears as if this behavior is intentional.

Screen Shot 2021-11-17 at 12 37 17 PM

The styling in Gutenberg source code automatically applies padding for blocks with a .has-background classname. Take the list block as an example:

// packages/block-library/src/list/style.scss

ol,
ul {
	// Break long strings of text without spaces so they don't overflow the block.
	overflow-wrap: break-word;

	&.has-background {
		padding: $block-bg-padding--v $block-bg-padding--h;
	}
}

I'm going to move this issue over to the core Gutenberg repo to see if they have thoughts about this. I understand how this might have been convenient for the block-editor, but now that we're dealing with site structure in the site editor, the mysterious padding and jumping content warrants discussion.

@jeyip
Copy link
Contributor

jeyip commented Nov 17, 2021

Closing this in favor of WordPress/gutenberg#36586

@jeyip jeyip closed this as completed Nov 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Goal] Full Site Editing [Pri] Normal Schedule for the next available opportuinity. [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

No branches or pull requests

3 participants