gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

Columns with padding breaks responsive layout

Open Sandstromer opened this issue 5 years ago • 3 comments

Description

When adding padding to an individual column in the columns block, the layout is broken in medium browser widths (600px to 781px).

Step-by-step reproduction instructions

Add a columns block with more than 1 column. Leave the default 'Stack on mobile' option on. Adjust the padding within each column to a value greater than zero. View the columns at browser widths between 600 and 781, and notice the 50/50 layout is broken.

Screenshots, screen recording, code snippet

columns-with-padding-responsive

Environment info

WP 5.8.2 Gutenberg 11.9.0 Any theme that does not provide it's own columns styling/layout override.

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

Sandstromer avatar Nov 11 '21 12:11 Sandstromer

Adding to the issue as this is related:

Not only that, but when setting up custom column widths for large screens, we can not control the smaller screen widths, which is unfortunate. And especially on tablet screen widths forcing flex-basis: calc( 50% - var(--column_gap) / 2)!important; styles can render creative layouts very unpleasant.

Some screenshots:

issue Screen Shot 2021-11-27 at 13 02 08

We really need responsive column width (and padding) setup!

webmandesign avatar Nov 27 '21 16:11 webmandesign

BTW, shoudn't flex-basis: calc( 50% - var(--column_gap) / 2)!important; styles be a theme territory?

webmandesign avatar Nov 27 '21 16:11 webmandesign

Checking back on this issue - I'm no longer able to recreate it. It seems the stacking behaviour kicks in sooner (at 781px) but even then the padding seems to behave correctly.

https://github.com/WordPress/gutenberg/assets/1842363/c8a792df-9e12-4ae7-896c-c7d59e102948

Accordingly I'll close this as no longer reproducible - but please feel free to reopen if there's something I've missed.

jordesign avatar Aug 18 '23 01:08 jordesign