WordPress / twentytwentytwo

Twenty Twenty-Two, the default WordPress theme that will launch with WordPress 5.9.
404 stars 92 forks source link

Beta 2 - changing font size of links in Styles changes all link font sizes #286

Closed mjsdiaz closed 2 years ago

mjsdiaz commented 2 years ago

Describe the bug

  1. If the font size of Styles > Typography > Links is changed, all links regardless of type pick up that font size. This includes Blocks such as the Post Title (with Make title a link) and the Post Date (with Link to post)

The Post Title link and Post Date link should not pick up the size assigned under Styles > Typography > Links; they should keep the size assigned in Theme.json or assigned to the individual block.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Appearance > Editor'
  2. Click on 'Post Title' or 'Post Date' - Both are links
  3. When on the Block and Settings, Scroll down to 'Typography' > Size.
  4. The font sizes change as expected.
  5. Go to Styles > Typography > Links
  6. Change the font size.
  7. All links, Paragraph, Post Title, and Post Date change size.
  8. Go back to each block (Post Title or Post Date) and try to change the font size.
  9. Error: The font size won't change, when I would expect to be able to change the Post Title font size regardless of whether it's a link or not.

Expected behavior The font size set on the block Typography should change the size of the Post Title or Post Date regardless of whether it's a link or not, and regardless of whether a font size has been set under Styles > Typography > Links.

Screenshots If applicable, add screenshots to help explain your problem.

Device: Mac Mini OS: Mac OS Big Sur 11.6 Browser: Chrome iVersion 96.0.4664.55 (Official Build) (x86_64) and FireFox 94.0.2 (64bit)

Additional context

jffng commented 2 years ago

Thanks for the report @mjsdiaz. I was able to replicate this in TT2. I also tested this in emptytheme, and the issue occurs there too, so it doesn't appear to be TT2-specific.

I will file a follow up issue upstream in Gutenberg and link it here.

kjellr commented 2 years ago

I'm not sure it even makes sense to have a font-size option for links. 🤷

mjsdiaz commented 2 years ago

Thank you for confirming and passing it on, @jffng.

I agree that links do not need their own size setting; they should pick up the size of the block they are in. I always wondered about that setting in theme.json, @kjellr

kjellr commented 2 years ago

Thanks! I'm going to close this now that it's been reported upstream.