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

Font picker not reflecting correct size with custom font sizes #67283

Open
3 of 6 tasks
mikemcalister opened this issue Nov 25, 2024 · 4 comments
Open
3 of 6 tasks

Font picker not reflecting correct size with custom font sizes #67283

mikemcalister opened this issue Nov 25, 2024 · 4 comments
Labels
[Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@mikemcalister
Copy link

Description

When a theme has several custom font sizes declared in theme.json, the global styles UI does not show the right label for the assigned font sizes. When you cycle through the H1-H6 selector, it shows random font sizes in the select label. See video below.

The issue does not affect a theme like 2025 which has the standard S, M, L, XL, XXL font size pattern. But when more font sizes are added to 2025, the issue does show.

Step-by-step reproduction instructions

  1. Add several custom font sizes to theme.json (more than 5).
  2. Go to Global Styles > Typography > Headings.
  3. Toggle back and forth between the H1-H6 selectors and note the label in the font size drop down versus the actual selection.

Screenshots, screen recording, code snippet

CleanShot.2024-11-25.at.13.56.46.mp4

Environment info

WP 6.7.1

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

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure
@mikemcalister mikemcalister added the [Type] Bug An existing feature does not function as intended label Nov 25, 2024
@carolinan
Copy link
Contributor

Hi
I don't follow. Are you saying that the font size that is the selected font size in the dropdown does not match the font size assigned to that heading level using theme.json elements?

@carolinan
Copy link
Contributor

carolinan commented Nov 26, 2024

Nevermind, I had the sound off when watching the video, I understand now.
Please remember that there may be contributors who are not able to see or hear the video.

@SainathPoojary
Copy link
Contributor

Hey @mikemcalister,

Thank you for reporting this issue. I confirm that the bug exists and was able to reproduce it as described.

Environment

  • WordPress: 6.8-alpha-59274-src
  • PHP: 8.2.25
  • Server: nginx/1.27.2
  • Database: mysqli (Server: 8.0.40 / Client: mysqlnd 8.2.25)
  • Browser: Chrome 131.0.0.0
  • OS: macOS
  • Theme: Twenty Twenty-Five 1.0
  • MU Plugins: None activated
Screen.Recording.2024-11-26.at.9.51.58.AM.mov

@Takshil-Kunadia
Copy link
Contributor

Takshil-Kunadia commented Dec 25, 2024

@mikemcalister @carolinan This should now be fixed. Can someone confirm this by testing, else I will pick this up. Thanks! 🙇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants