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

[Bug]: Core Styles Adding Unremovable Gap Between Header and Content #62782

Closed
bobmatyas opened this issue Apr 14, 2022 · 2 comments
Closed

[Bug]: Core Styles Adding Unremovable Gap Between Header and Content #62782

bobmatyas opened this issue Apr 14, 2022 · 2 comments
Labels
Empathy Testing This tag is applied to bugs found when testing user flows. Needs triage Ticket needs to be triaged [Type] Bug When a feature is broken and / or not performing as intended

Comments

@bobmatyas
Copy link

Quick summary

Default CSS adds gap between header and content that can't be removed.

Tested with Twenty Twenty Two theme.

Steps to reproduce

  1. Create a template
  2. Add header
  3. Add block such as a "Cover Block" that you want to line up against header with post content
  4. Observe gap between blocks

What you expected to happen

I shouldn't have a gap between elements or if there is, I should be able to edit it without CSS.

I can't edit without CSS because core styles are applied:

.wp-site-blocks > * + * {
  margin-block-start: var( --wp--style--block-gap );
}

What actually happened

There is a gap that can't be removed between header and site content.

Editor View:

Screenshot on 2022-04-14 at 12-11-54

Frontend:

Annotation on 2022-04-14 at 12-10-55

Context

I encountered this while doing FSE testing to build a custom "post in a series" view

Browser

Mozilla Firefox

Simple/Atomic

Simple

Other notes

Can't be fixed on plans without CSS editing.

Reproducibility

Consistent

Severity

All

Available workarounds?

Yes, easy to implement

Workaround details

Can use this in Custom CSS:

.wp-site-blocks > * + * {
    margin-block-start: 0;
}
@bobmatyas bobmatyas added [Type] Bug When a feature is broken and / or not performing as intended Needs triage Ticket needs to be triaged Empathy Testing This tag is applied to bugs found when testing user flows. labels Apr 14, 2022
@edequalsawesome
Copy link

Came up in 35997697-hc

@jordesign
Copy link
Contributor

Closing this to consolidate into #64438

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Empathy Testing This tag is applied to bugs found when testing user flows. Needs triage Ticket needs to be triaged [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

No branches or pull requests

3 participants