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

Blockbase: remove unused post meta styling #4522

Closed
RavanH opened this issue Sep 2, 2021 · 3 comments · Fixed by #4565
Closed

Blockbase: remove unused post meta styling #4522

RavanH opened this issue Sep 2, 2021 · 3 comments · Fixed by #4565
Assignees

Comments

@RavanH
Copy link
Contributor

RavanH commented Sep 2, 2021

Proposal

There are several style rules and files that are aimed at a block with class .post-meta. There is no such block used in Blockbase. However, these styles are used in child themes Mayland Blocks and Skatepark. I would argue that these style belong there, not in the parent theme.

Files involved are:
sass/post/_meta.scss
sass/ponyfill.scss (last import)
assets/svg/post-author.svg
assets/svg/post-category.svg
assets/svg/post-date.svg
assets/svg/post-tag.svg (already missing!)

Of course, the child themes in question would need to set up their own version of:

	.wp-block-post-author,
	.wp-block-post-date,
	.wp-block-post-tags,
	.wp-block-post-hierarchical-terms {
		display: flex;
		margin-right: calc(2 * var(--wp--custom--margin--baseline) );
	}

	.wp-block-post-author:before,
	.wp-block-post-date:before,
	.wp-block-post-tags:before,
	.wp-block-post-hierarchical-terms:before {
		align-self: center;
		content: '';
		display: inline-block;
		margin-right: calc(0.5 * var(--wp--custom--margin--baseline) );
		height: 16px;
		width: 16px;
		background-color: currentColor;
	}

Alternative: fix missing post-tag.svg, fix .wp-block-post-tags (should be .wp-block-post-terms) and move the scss out of the post-meta class so it will work independently for the Post Author/Date/Categories/Tags blocks that can be added in posts or pages.

@scruffian
Copy link
Member

I think I'd prefer to add post meta to blockbase :)

@MaggieCabrera
Copy link
Contributor

Thanks for this PR, I totally agree that if the css is not used by the theme it shouldn't be there, but since all the children use it, I think it makes a compelling argument that Blockbase should include it too, since it's a pattern that's widely used all over. @kjellr do you think we should add this to Blockbase? This is how it looks like in Seedlet blocks:

Screenshot 2021-09-03 at 13 39 19

@kjellr
Copy link
Contributor

kjellr commented Sep 3, 2021

Yeah, I think it makes sense to add it to blockbase — even if it just houses the post date to start.

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

Successfully merging a pull request may close this issue.

5 participants