Post terms block: Separate styling of terms and suffix/prefix #57998
Labels
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
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 ina
.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).
The text was updated successfully, but these errors were encountered: