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

Spacing Block Support allows extremely large padding values causing overflow #31773

Open
stacimc opened this issue May 12, 2021 · 3 comments
Open
Labels
CSS Styling Related to editor and front end styles, CSS-specific issues. [Feature] Layout Layout block support, its UI controls, and style output. [Type] Enhancement A suggestion for improvement.

Comments

@stacimc
Copy link
Contributor

stacimc commented May 12, 2021

Description

The spacing block support allows the user to enter arbitrarily large values for padding, which does not respect width or max-width set on the block and can cause the block to overflow the page.

Step-by-step reproduction instructions

  1. Create a new post and insert a Cover block.
  2. In the Inspector Controls, open the Spacing panel, enter a very large number in the Padding input (99999), and hit Enter.

Expected behaviour

The block should not exceed the width of the page.

Actual behaviour

There is no maximum amount of padding, and the block becomes extremely large and overflows the page.

Screenshots or screen recording (optional)

Screen Shot 2021-05-12 at 4 32 48 PM

_Note the horizontal scrollbar._

Code snippet (optional)

WordPress information

  • WordPress version: 5.7.1
  • Gutenberg version: trunk
  • Are all plugins except Gutenberg deactivated? Yes
  • Are you using a default theme (e.g. Twenty Twenty-One)? Yes

Device information

  • Device: Desktop
  • Operating system: Mac Big Sur
  • Browser: Chrome 90
@priethor priethor added [Block] Spacer Affects the Spacer Block [Type] Enhancement A suggestion for improvement. [Block] Cover Affects the Cover Block - used to display content laid over a background image and removed [Block] Spacer Affects the Spacer Block labels May 14, 2021
@Quintis1212
Copy link
Contributor

Hi @stacimc ) I will try to fix this bug )

@Quintis1212
Copy link
Contributor

I created PR to fix this bug - #32131

@skorasaurus
Copy link
Member

skorasaurus commented Jul 2, 2024

This is applicable to all core blocks that have the spacing support; not just cover block; able to reproduce in gutenberg 18.6 with a group block.

@skorasaurus skorasaurus added CSS Styling Related to editor and front end styles, CSS-specific issues. [Feature] Layout Layout block support, its UI controls, and style output. [Type] Enhancement A suggestion for improvement. and removed [Type] Enhancement A suggestion for improvement. [Block] Cover Affects the Cover Block - used to display content laid over a background image labels Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CSS Styling Related to editor and front end styles, CSS-specific issues. [Feature] Layout Layout block support, its UI controls, and style output. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

4 participants