Skip to content

Featured Image: CSS set in theme.json is overwritten by gutenberg #64453

@dsas

Description

@dsas

Description

The core/post-featured-image block has some styles which out specify CSS set in theme.json / the site editor.

I'd expect those CSS rules to be scoped with less specificity, so themes and users can override them when necessary.

Step-by-step reproduction instructions

  1. Add a post with a featured image
  2. Activate the Luminance theme which includes some custom css as a block style
    • Happy to laboriously explain how to do the same thing manually in TT4 if necessary!
  3. View the front-end of the site, the image will look all broken and misaligned.

Screenshots, screen recording, code snippet

Screenshot 2024-08-12 at 18 40 10

Environment info

WP Version: 6.6.1
GB Version: Repro'd on trunk (9c96970) and GB 18.9.0

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

Labels

[Block] Post Featured ImageAffects the Post Featured Image Block[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