Directory

Post terms block: Separate styling of terms and suffix/prefix · Issue #57998 · WordPress/gutenberg · GitHub
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

Post terms block: Separate styling of terms and suffix/prefix #57998

Open
audunmb opened this issue Jan 19, 2024 · 0 comments
Open

Post terms block: Separate styling of terms and suffix/prefix #57998

audunmb opened this issue Jan 19, 2024 · 0 comments
Labels
[Block] Post Terms Affects the Post Terms Block [Type] Enhancement A suggestion for improvement.

Comments

@audunmb
Copy link

audunmb commented Jan 19, 2024

Any styling added to the post terms (tags and categories) block affects the whole block including suffixes and prefixes. Link styling will override the styling of the block.

So in Twenty Twenty Two and Three, by default post terms will be underlined, even if the block is set to text decoration none. In Twenty Twenty Four there's an override that says .wp-block-post-terms a:where(:not(.wp-element-button)) { text-decoration: none;}, but adding underlining will also affect the prefix if added.

This is because styling is added on the post block (div), while the terms are wrapped in a.

There's an option to change the link color, which will only affect the terms (which are links), but nothing else.

Solutions

1. Add an option to style the link typography of the block in the block editor somehow.

or

2. Make post terms into inner blocks.

The second option is probably the best and allows for many more options when styling the block (easy to add things like the pill style in TT4 or similar).

@audunmb audunmb added the [Type] Enhancement A suggestion for improvement. label Jan 19, 2024
@colorful-tones colorful-tones added the [Block] Post Terms Affects the Post Terms Block label Jan 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Post Terms Affects the Post Terms Block [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

2 participants