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

core/comment-date doesn't obey font-size settings #41728

Closed
pbking opened this issue Jun 14, 2022 · 1 comment · Fixed by #41627
Closed

core/comment-date doesn't obey font-size settings #41728

pbking opened this issue Jun 14, 2022 · 1 comment · Fixed by #41627

Comments

@pbking
Copy link
Contributor

pbking commented Jun 14, 2022

Description

The comment-date block is ALWAYS 'small' size and cannot be customized either via Global Styles or block attributes.

Step-by-step reproduction instructions

Tested with Empty Theme.

Add the following block to a page:

<!-- wp:comments-query-loop -->
<div class="wp-block-comments-query-loop">
<!-- wp:comment-template -->

<!-- wp:comment-date {"style":{"typography":{"fontSize":"4px"}}} /-->

<!-- /wp:comment-template -->
</div>
<!-- /wp:comments-query-loop -->

Render a page that has at least one comment.

Note that the comment-date is rendered with BOTH the font size set to 4px (via style attribute) and --wp--preset--font-size-small. But since the small font size is !important it always wins. The block has the has-small-font-size class which it shouldn't have.

This was also tested with the block like this:

<!-- wp:comment-date /-->

as well as theme.json settings like this:

{
	"styles": {
		"blocks": {
			"core/comment-date": {
				"typography": {
					"fontSize": "4px"
				}
			}
...

The result was the same.

Screenshots, screen recording, code snippet

<div style="font-size: 4px;" class="has-small-font-size wp-block-comment-date"><time datetime="2022-06-09T19:24:21+00:00"><a href="http://localhost:4759/?p=1594#comment-8">June 9, 2022</a></time></div>

image

Environment info

WordPress 6.0
Gutenberg /trunk

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

@pbking
Copy link
Contributor Author

pbking commented Jun 14, 2022

Looks like this will be fixed via #41627 which is already about to land. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant