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

ResizeTooltip: Use default.fontFamily on tooltip #48805

Merged
merged 3 commits into from
Mar 8, 2023

Conversation

richtabor
Copy link
Member

What?

Small PR to fix one of the issues reported as part of #48443.

Why?

The theme's body font family is incorrectly applied to the resize tooltip. The editor's UI should not be influenced by the theme's font family.

How?

Use ${ font( 'default.fontFamily' ) }; on resize tooltip styles.

Testing Instructions

  1. Switch to a theme using a noticeable body font (like Twenty Fifteen).
  2. Open a Post or Page.
  3. Insert a Spacer block.
  4. Resize it using the ResizableBox handle.
  5. See the resize tooltip no longer using the body font from the theme.

Screenshots or screencast

Before:
CleanShot 2023-03-06 at 15 32 34

After:
CleanShot 2023-03-06 at 15 30 39

@richtabor richtabor added [Type] Bug An existing feature does not function as intended [Package] Components /packages/components labels Mar 6, 2023
@richtabor richtabor requested a review from ajitbohra as a code owner March 6, 2023 20:50
@github-actions
Copy link

github-actions bot commented Mar 6, 2023

Flaky tests detected in 1f8a5ef.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4347833358
📝 Reported issues:

@mirka mirka requested review from ciampo and mirka March 8, 2023 09:36
Copy link
Contributor

@ciampo ciampo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for working on this 🚀

Before merging, could you add an entry to the CHANGELOG ?

Copy link
Member

@mtias mtias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This has been bothering me quite a bit :)

@richtabor richtabor changed the title Use proper font family on resize tooltip ResizeTooltip: Use default.fontFamily on tooltip Mar 8, 2023
@richtabor richtabor merged commit 1af9cab into trunk Mar 8, 2023
@richtabor richtabor deleted the fix/tooltip-font-family branch March 8, 2023 23:04
@github-actions github-actions bot added this to the Gutenberg 15.4 milestone Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Components /packages/components [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants