Skip to content

Can't set global background color for Post Template #59455

Closed

Description

Description

Trying to set a background color for the Post Template block in global styles has no effect due to some overly-specific styling in the block CSS.

That was added in #37941 as a workaround for global styles for the List block bleeding into any other block that uses a ul (the same problem stands un-worked-around in the Navigation block)

The sustainable solution here would be to add a classname to the List block so we can attach global styles to it without contaminating other blocks with lists in their markup. My suggestion is revisiting #12420. Cc @carolinan who did some work on it previously!

Step-by-step reproduction instructions

  1. In global styles panel, under blocks > Post Template, try adding a background color.
  2. Save and verify that it has no effect in the editor or in the front end.

Screenshots, screen recording, code snippet

No response

Environment info

No response

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Labels

[Block] ListAffects the List Block[Block] Post TemplateAffects the Post Template 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