Skip to content

Content Block: Unwanted top margin on the first visible element in the block when it's inside a query block in the site editor. #69989

@iamtakashi

Description

@iamtakashi

Description

Sorry for the long title! There is an extra top margin on the first element in the content block when it's inside a query block. This is because, in the markup, the first visible element is not the first child, so the margin removal rule does not apply to it. This issue only occurs in the site editor. This is not a theme-specific issue.

Step-by-step reproduction instructions

  1. Go to the site editor
  2. Place a content block inside a query block.
  3. See the unwanted gap on the first visible element.

Screenshots, screen recording, code snippet

Image

Environment info

  • WP 6.8
  • Gutenberg Trunk (The issue occurs even without activating Gutenberg)
  • TT5, but not a theme-specific issue.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Block] Post ContentAffects the Post Content Block[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions