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

Group Blocks on Dyad 2 have padding issues. #7968

Open
1 task
KirkwallDay opened this issue Jul 19, 2022 · 8 comments
Open
1 task

Group Blocks on Dyad 2 have padding issues. #7968

KirkwallDay opened this issue Jul 19, 2022 · 8 comments
Labels
Blocks Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". [Feature Group] Appearance & Themes Features related to the appearance of sites. [Platform] Atomic [Platform] Simple [Pri] Low Triaged [Type] Bug Something isn't working User Report This issue was created following a WordPress customer report

Comments

@KirkwallDay
Copy link

Quick summary

The group block will have padding on some elements preventing content from aligning correctly inside the block. This is easiest to see with a group block and center-aligned column blocks inside of it.

Steps to reproduce

  1. Have a site with the Dyad 2 theme activated.
  2. Create a group block with a columns block inside of it. Add some test content.
  3. Set the columns to show content center-aligned vertically.
  4. In the editor it will look fine.
  5. Preview the page in a new tab to see the live site view.

Here is the code of the group block I used:

<!-- wp:group {"backgroundColor":"light-gray-blue"} -->
<div class="wp-block-group has-light-gray-blue-background-color has-background"><!-- wp:columns -->
<div class="wp-block-columns"><!-- wp:column {"verticalAlignment":"center"} -->
<div class="wp-block-column is-vertically-aligned-center"><!-- wp:heading -->
<h2>test</h2>
<!-- /wp:heading --></div>
<!-- /wp:column -->

<!-- wp:column {"verticalAlignment":"center"} -->
<div class="wp-block-column is-vertically-aligned-center"><!-- wp:paragraph -->
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent eget porta diam. Aenean pharetra, tellus eu fermentum pulvinar, lectus est dignissim quam, vitae tempus nibh ipsum eget ante. Interdum et malesuada fames ac ante ipsum primis in faucibus. Curabitur vitae mollis mauris. In maximus venenatis facilisis. Sed non porta velit, id auctor tellus. Vestibulum id libero maximus, finibus leo ut, facilisis massa. Cras in placerat ante, nec congue dui.</p>
<!-- /wp:paragraph --></div>
<!-- /wp:column --></div>
<!-- /wp:columns --></div>
<!-- /wp:group -->

What you expected to happen

The blocks should look like they do in the editor.

What actually happened

Instead, there is padding added to the bottom of the block.

Editor view:
Editor View

Live View:
Dyad 2 Live

The space with the red rectangle shows the extra padding added by the theme.

Hemingway Re-written live view:
Hemingway Re-written

Less pronounced but still there.

Twenty Twenty-One live view:
Twenty Twenty-two

Looks good here.

Context

  • 5405228-zen

Platform (Simple, Atomic, or both?)

Simple, Atomic

Theme-specific issue?

Dyad 2, Hemingway Re-written

Browser, operating system and other notes

No response

Reproducibility

Consistent

Severity

Some (< 50%)

Available workarounds?

Yes, easy to implement

Workaround details

CSS can fix the issue, it seems to vary from theme to theme.

On Dyad 2, set a no-padding custom class to the block and add this code:

.no-padding {
padding-top: 1.25em !important;
padding-bottom: 0 !important;
}

On Hemingway Re-written it's caused by the paragraph block having added padding. Set the same no-padding class to the group block and then use this code:

.no-padding p {
    margin-bottom: 0;
}
@KirkwallDay KirkwallDay added [Type] Bug Something isn't working User Report This issue was created following a WordPress customer report Blocks labels Jul 19, 2022
@github-actions
Copy link
Contributor

Support References

This comment is automatically generated. Please do not edit it.

  • 5405228-zen

@devNigel
Copy link

I tried to reproduce this issue and I noticed that the Group block has a setting to remove the top and bottom padding which worked on Editor view but had no effect on the live page. Was able to confirm with multiple themes like Dyad 2, 2020.

I think that issue is also related to this.

@supernovia
Copy link

The blocks should look like they do in the editor.

@KirkwallDay would you happen to have a handy screenshot of that?

@renata-franco renata-franco changed the title Group Blocks on some themes (Dyad 2, Hemingway Re-written, possibly more) have padding issues. Group Blocks on Dyad 2 have padding issues. Jul 27, 2022
@renata-franco
Copy link

📌 SCRUBBING

  • Tested on Simple ✅
  • Tested on AT ✅
  • Tested on Self-hosted ✅
  • Replicable on Core - Yes

📌 FINDINGS/SCREENSHOTS/VIDEO

I was able to replicate this issue on Simple and AT sites, as well as self-hosted.

AT site, Simple site, and Self-Hosted site:

Editor Look imagen
Preview on Desktop imagen

Created my own Group Blocks with two Columns and also three Columns inside. I tested with other blocks outside of the Group Block.

Checked with the following non-FSE themes and it's not replicable: Rowling, Mayland, Ryu. Could not replicate this using Hemingway Rewritten, which actually looks like this:

imagen

Regarding this comment I do not see this option for the Group Block on my end, not sure why. @devNigel Can you let me know if this is available for a particular reason on your end?

imagen

Here is what I see:

imagen


📌 ACTIONS

  • Marked as Triaged for Quality Squad review

@renata-franco renata-franco added the [Feature Group] Appearance & Themes Features related to the appearance of sites. label Jul 27, 2022
@devNigel
Copy link

@renata-franco Do you have CoBlocks active? Based on this thread, it looks like it is a feature from CoBlocks.

@renata-franco
Copy link

@renata-franco Do you have CoBlocks active? Based on this thread, it looks like it is a feature from CoBlocks.

No, I do not have CoBlocks on any of the sites. We stopped having that plugin as default a while ago. Can you try deactivating it on the site where you took the screenshot to see if the option still appears?

@simison simison transferred this issue from Automattic/wp-calypso Jul 24, 2024
@matticbot matticbot moved this from Needs Triage to Triaged in Automattic Prioritization: The One Board ™ Jul 24, 2024
@github-actions github-actions bot added the Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". label Jul 24, 2024
@peterschimke
Copy link

@alaczek is this something your team can look at?

@alaczek
Copy link
Contributor

alaczek commented Dec 4, 2024

Dyad 2 is a classic theme with minimal Gutenberg support, and I think the extra padding when a group block has background is some sort of default style that gets applied if the theme doesn't supply it's own.

Not sure if this is feasible here, but avoiding the group block and adding background directly to the columns block helps somewhat:

Background added to columns block (there's still an uneven gap because of bottom padding on paragraph block, but it's smaller):
Image

Background added to parent group block:
Image

Given it's a classic theme, and quite old, we're unlikely to make changes to it at this stage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blocks Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". [Feature Group] Appearance & Themes Features related to the appearance of sites. [Platform] Atomic [Platform] Simple [Pri] Low Triaged [Type] Bug Something isn't working User Report This issue was created following a WordPress customer report
Projects
Development

No branches or pull requests

6 participants