Skip to content

columns-{columns} class no longer applied to Query Loop / Post Template #51346

@justintadlock

Description

@justintadlock

With the change from Flex to the Grid layout with the Query Loop + Post Template blocks in #49050, the columns-{columns} class was removed here. This means that theme authors can no longer target queries via custom block styles based on the column number.

Previously, the Post Template block's output would look something like this for a three-column layout:

<ul class="is-flex-container columns-3 wp-block-post-template is-layout-flow wp-block-post-template-is-layout-flow">

Today, it looks like this:

<ul class="wp-block-post-template is-layout-grid wp-container-34 wp-block-post-template-is-layout-grid">

The new gap support is much needed, so I don't think this needs to be reverted. We just need to add the columns-{columns} class back in unless there is a technical reason not to do so (didn't see this mentioned anywhere in the PR).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions