Skip to content

Cover image as featured image + "Fixed background" duplicates the style element. #43092

Description

@Gierand

Description

Adding a cover image as featured image with the "Fixed background" option duplicates the style element, which will result in the following code on the frontend:

<div class="wp-block-cover is-light has-parallax" style="background-image:url(PATH_TO_IMAGE);" style="margin-top:111px">

Step-by-step reproduction instructions

  1. Create a new post.
  2. Add featured image.
  3. Add cover block as featured image.
  4. In Media settings check "Fixed background".
  5. Add any custom styles (margin or padding).

Screenshots, screen recording, code snippet

No response

Environment info

WordPress version: 6.0.1 and 6.1-alpha-53771
Gutenberg version: 13.8.1 and 13.9.20220808
Theme: TT2

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Block] CoverAffects the Cover Block - used to display content laid over a background image[Type] BugAn existing feature does not function as intended

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions