Description
Post Title blocks have an option to turn the title into a link, as you'd want on a homepage. But you can't set text-decoration on such links from the editor. It's always just underlined.
Even if you edit theme.json, the WP-generated #wp-block-post-title-inline-css embedded stylesheet seems to ignore what you set for textDecoration on Post Title links even though:
- it respects other typography attributes, such as
fontWeight and fontSize
- it lets you set
textDecoration for :hover, :active and :focus for Post Title links
I also tried adding :link or :any-link selectors as an attempted workaround, but WP just ignored them.
Step-by-step reproduction instructions
- Install WP 6.1.1.
- Apply the
Twenty Twenty-Three theme.
- Edit the
Home template.
- Select the
Post Title block.
- Make sure
Make title a link is enabled in the settings for that block.
- Add the
Decoration typography option in the block settings.
- Set it to
- (none).
- Observe that nothing happens, and the links are still underlined.
- Go to
Tools > Theme File Editor and select the Twenty Twenty-Three theme.
- Click on
Theme Styles & Block Settings (theme.json) from the file selector.
- Search for the
core/post-title block under styles > blocks, and try to set the Post Title block's "link" element's textDecoration to "none":
...
"core/post-title": {
...
"elements": {
"link": {
":hover": {
...
},
":focus": {
...
},
":active": {
...
},
"typography": {
"textDecoration": "none"
}
}
}
},
...
- Click
Update File.
- Go to Homepage and notice that the Post Title links are still underlined.
- Look at the
#wp-block-post-title-inline-css <style> element and notice that the .wp-block-navigation a:where(:not(.wp-element-button)) selector still has text-decoration: underline.
- Try setting the
fontSize or fontWeight attribute on Post Title links in the exact same place as above in theme.json. Notice that the embedded stylesheet changes to reflect those values, and your Post Title links can have a custom size or weight, just not text-decoration.
Screenshots, screen recording, code snippet

The text-decoration attribute on the .wp-block-post-title a:where(:not(.wp-element-button)) selector will always be set to underline no matter what you do.
You can add font-weight or font-size to that selector. But WP won't let you change the text-decoration attribute:

The above theme.json produces the following embedded stylesheet:

Environment info
- WordPress 6.1.1
- Chrome on MacOS
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
Description
Post Title blocks have an option to turn the title into a link, as you'd want on a homepage. But you can't set
text-decorationon such links from the editor. It's always just underlined.Even if you edit
theme.json, the WP-generated#wp-block-post-title-inline-cssembedded stylesheet seems to ignore what you set fortextDecorationon Post Title links even though:fontWeightandfontSizetextDecorationfor:hover,:activeand:focusfor Post Title linksI also tried adding
:linkor:any-linkselectors as an attempted workaround, but WP just ignored them.Step-by-step reproduction instructions
Twenty Twenty-Threetheme.Hometemplate.Post Titleblock.Make title a linkis enabled in the settings for that block.Decorationtypography option in the block settings.-(none).Tools > Theme File Editorand select theTwenty Twenty-Threetheme.Theme Styles & Block Settings (theme.json)from the file selector.core/post-titleblock understyles > blocks, and try to set the Post Title block's"link"element'stextDecorationto"none":Update File.#wp-block-post-title-inline-css<style>element and notice that the.wp-block-navigation a:where(:not(.wp-element-button))selector still hastext-decoration: underline.fontSizeorfontWeightattribute on Post Title links in the exact same place as above intheme.json. Notice that the embedded stylesheet changes to reflect those values, and your Post Title links can have a custom size or weight, just not text-decoration.Screenshots, screen recording, code snippet
The
text-decorationattribute on the.wp-block-post-title a:where(:not(.wp-element-button))selector will always be set tounderlineno matter what you do.You can add
font-weightorfont-sizeto that selector. But WP won't let you change thetext-decorationattribute:The above

theme.jsonproduces the following embedded stylesheet:Environment info
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