Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make .wp-block-post stylable via theme.json #39599

Open
Tracked by #41405
ClarusDignus opened this issue Mar 20, 2022 · 2 comments
Open
Tracked by #41405

Make .wp-block-post stylable via theme.json #39599

ClarusDignus opened this issue Mar 20, 2022 · 2 comments
Labels
[Block] Post Template Affects the Post Template Block [Block] Query Loop Affects the Query Loop Block [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Type] Enhancement A suggestion for improvement.

Comments

@ClarusDignus
Copy link

ClarusDignus commented Mar 20, 2022

Problem

I can style various aspects of the Query Loop block via theme.json.

E.g. core/post-template styles .wp-block-post-template, core/post-title styles .wp-block-post-title, etc.

"blocks": {
	"core/post-template": {
		"border": {
			"style": "solid",
			"width": "1px",
			"color": "#000"
		}
	},
	"core/post-title": {
		"border": {
			"style": "solid",
			"width": "1px",
			"color": "#000"
		}
	}
}

However, core/post doesn't style .wp-block-post.

"blocks": {
	"core/post": {
		"border": {
			"style": "solid",
			"width": "1px",
			"color": "#000"
		}
	}
}

.wp-block-post is the container of each post outputted by the Query Loop block, i.e., it contains each post's title, featured image, date, excerpt, etc.

Proposed Solution

Please make .wp-block-post stylable via theme.json like the elements it's within and elements within it.

Currently, I'm limited to styling .wp-block-template via style.css. One of the downsides of this is that the style doesn't apply in the editor.

core/post isn't a block in the sense that it can be selected and edited via the editor.

@ocean90 ocean90 added [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Block] Query Loop Affects the Query Loop Block [Block] Post Template Affects the Post Template Block labels Mar 22, 2022
@github-actions
Copy link

Hi,
This issue has gone 180 days without any activity. This means it is time for a check-in to make sure it is still relevant. If you are still experiencing this issue with the latest versions, you can help the project by responding to confirm the problem and by providing any updated reproduction steps.
Thanks for helping out.

@github-actions github-actions bot added the Needs Testing Needs further testing to be confirmed. label Sep 27, 2022
@kathrynwp kathrynwp added [Type] Enhancement A suggestion for improvement. [Priority] Normal and removed Needs Testing Needs further testing to be confirmed. labels Sep 27, 2022
@carolinan
Copy link
Contributor

This class can now be styled in theme.json with the custom CSS option.
Does that solve the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Post Template Affects the Post Template Block [Block] Query Loop Affects the Query Loop Block [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

5 participants