Skip to content

Post-templates 'wp-block-post' class missing in li-element in editor #39991

@Humanify-nl

Description

@Humanify-nl

Description

On the front-end, the class wp-block-post is added to the li elements of the wp-block-post-template.

In the editor on the back-end, this class is not present.

Why is this important?

  • Especially for li elements i'd say it is always better to target a specific class for custom CSS (developer experience). To reduce specificity problems.
  • The CSS block-classes on front and back-end should be 1-on-1.

Step-by-step reproduction instructions

  1. Fresh TT2 install or any clean block theme
  2. Add a query loop, choose a template.
  3. Inspect the code in the editor for wp-block-post-template > li
  4. Compare with front-end.

Screenshots, screen recording, code snippet

No response

Environment info

  • WordPress 5.9.2
  • Checked without and with latest Gutenberg (12.9)

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 TemplateAffects the Post Template 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