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

Grid Column Width Exceeding Container on mobile (Grid interactivity) #69060

Open
3 of 6 tasks
huubl opened this issue Feb 5, 2025 · 0 comments · May be fixed by #69059
Open
3 of 6 tasks

Grid Column Width Exceeding Container on mobile (Grid interactivity) #69060

huubl opened this issue Feb 5, 2025 · 0 comments · May be fixed by #69059
Labels
[Type] Bug An existing feature does not function as intended

Comments

@huubl
Copy link
Contributor

huubl commented Feb 5, 2025

Description

The grid columns are exceeding their container's width. I expect the columns to fit within the container, but they overflow instead.

More information: #69059

Step-by-step reproduction instructions

  1. Create a Playground: https://playground.wordpress.net/?networking=yes&plugin=gutenberg
  2. Enable "Blocks: add Grid interactivity" in the Experimental settings
  3. Add this to a page:
<!-- wp:group {"align":"full","layout":{"type":"grid","columnCount":2,"minimumColumnWidth":"793px"}} -->
<div class="wp-block-group alignfull"><!-- wp:group {"style":{"color":{"background":"#ff0000"},"spacing":{"padding":{"top":"var:preset|spacing|30","bottom":"var:preset|spacing|30","left":"20px","right":"20px"}}},"layout":{"type":"default"}} -->
<div class="wp-block-group has-background" style="background-color:#ff0000;padding-top:var(--wp--preset--spacing--30);padding-right:20px;padding-bottom:var(--wp--preset--spacing--30);padding-left:20px"><!-- wp:paragraph -->
<p>On mobile this column gets wider than its container</p>
<!-- /wp:paragraph --></div>
<!-- /wp:group -->

<!-- wp:group {"style":{"color":{"background":"#ff0000"},"spacing":{"padding":{"top":"var:preset|spacing|30","bottom":"var:preset|spacing|30","left":"20px","right":"20px"}}},"layout":{"type":"default"}} -->
<div class="wp-block-group has-background" style="background-color:#ff0000;padding-top:var(--wp--preset--spacing--30);padding-right:20px;padding-bottom:var(--wp--preset--spacing--30);padding-left:20px"><!-- wp:paragraph -->
<p>On mobile this column gets wider than its container</p>
<!-- /wp:paragraph --></div>
<!-- /wp:group --></div>
<!-- /wp:group -->
  1. Check frontend at 400px viewport and confirm the columns are exceeding the viewport/grid container.

Screenshots, screen recording, code snippet

No response

Environment info

No response

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

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure
@huubl huubl added the [Type] Bug An existing feature does not function as intended label Feb 5, 2025
@huubl huubl changed the title Grid Column Width Exceeding Container (Grid interactivity) Grid Column Width Exceeding Container on mobile (Grid interactivity) Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant