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

Discrepancy in Font Family between Editor and Front End #89631

Closed
jorpdesigns opened this issue Apr 17, 2024 · 7 comments · Fixed by Automattic/jetpack#37043
Closed

Discrepancy in Font Family between Editor and Front End #89631

jorpdesigns opened this issue Apr 17, 2024 · 7 comments · Fixed by Automattic/jetpack#37043
Labels
Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". [Feature Group] Editor Experience Features related to Gutenberg integration on WordPress.com. [Feature] Post/Page Editor The editor for editing posts and pages. Needs triage Ticket needs to be triaged [Platform] Atomic [Platform] Simple [Pri] Normal Schedule for the next available opportuinity. [Product] WordPress.com All features accessible on and related to WordPress.com. [Status] Priority Review Triggered Quality squad has been notified of this issue in #dotcom-triage-alerts [Type] Bug

Comments

@jorpdesigns
Copy link

jorpdesigns commented Apr 17, 2024

Quick summary

In the Page or Post Editor, the default font family is different from what is shown on the Front End. Initially thought the bug was similar to #86570 but it appears to occur on more themes (tested on Kingsley, Arbutus, Geologist, Archeo, Feelin' Good and Bedrock).

Editor View

fG48Qn.png

Front End View

bfJwDh.png

Steps to reproduce

  1. Open a test site and activate any of these themes: Kingsley, Arbutus, and Geologist (or probably any theme).
  2. Create a new post.
  3. Add a paragraph with sample text.
  4. Preview your changes.

What you expected to happen

Font family should be consistent in both the Editor and on the Front End.

What actually happened

Font family in the Editor is different to what is shown on the Front End. Looks like the Editor is using the system font?

Impact

Some (< 50%)

Available workarounds?

No but the platform is still usable

Platform (Simple and/or Atomic)

Simple, Atomic

Logs or notes

Reported in 8056292-zen

@jorpdesigns jorpdesigns added [Type] Bug [Feature] Post/Page Editor The editor for editing posts and pages. Needs triage Ticket needs to be triaged [Product] WordPress.com All features accessible on and related to WordPress.com. [Feature Group] Editor Experience Features related to Gutenberg integration on WordPress.com. labels Apr 17, 2024
@github-actions github-actions bot added [Status] Priority Review Triggered Quality squad has been notified of this issue in #dotcom-triage-alerts [Platform] Atomic [Platform] Simple [Pri] High Address as soon as possible after BLOCKER issues labels Apr 17, 2024
Copy link

github-actions bot commented Apr 17, 2024

Support References

This comment is automatically generated. Please do not edit it.

  • 8056292-zen
  • 8063771-zen

@github-actions github-actions bot added the Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". label Apr 17, 2024
@tvolpert
Copy link

tvolpert commented Apr 18, 2024

same issue in 8063771-zen, using the Byrne theme.

it looks like what's happening behind-the-scenes (on this user's site anyway) is that editor-experimental.css and index.css are overriding the body font choice set in the editor -- because declaring just body is more specific than :where(body), which is what the <style> tag is using.

:where(body) seems like an unnecessarily-complicated way to try and select this element anyway, unless we're trying to give it 0 specificity for some reason...

Screenshot 2024-04-18 at 12 43 49 PM

@mrfoxtalbot
Copy link

Thank you for the additional details, @tvolpert. Just to make sure I am following you, does this mean the bug is theme-dependent or does it have to do with the way we implement Gutenberg on dotcom?

If it is theme-specific, we should transfer it to the /themes remo and tag the affected themes.

Thank you!

@mrfoxtalbot
Copy link

@jorpdesigns, were you able to reproduce this (on simple or AT) using Twenty Twenty-Four or any other of the bundled themes?

@mrfoxtalbot mrfoxtalbot added [Status] Needs Author Reply [Pri] Normal Schedule for the next available opportuinity. and removed [Pri] High Address as soon as possible after BLOCKER issues labels Apr 19, 2024
@mrfoxtalbot mrfoxtalbot moved this from Needs Triage to In Triage in Automattic Prioritization: The One Board ™ Apr 19, 2024
@tvolpert
Copy link

tvolpert commented Apr 19, 2024

@mrfoxtalbot It's a little of both really, but I think it probably lands more on the theme side than the Gutenberg side? But it seems to affect a lot of themes. I've been able to replicate using Twenty Twenty-Four and Infield just now.

The problem (as far as I can tell anyway) comes down to CSS specificity: the Gutenberg stylesheets are more specific with their selectors for the default body font than the theme is. So, theoretically, any theme that uses just plain old body as a selector instead of :where(body) would most likely be fine, as long as it comes later in the Cascade. But it seems like a lot of our themes are using :where(body) for... reasons that I assume sounded good at the time, but I can't fathom what they would be.

@tvolpert
Copy link

Also confirmed it's an issue on Simple sites as well as Atomic. it's especially egregious on the Free plan because changing that font will prompt you to upgrade in order to unlock custom styles that you can't even see 😬

@mrfoxtalbot
Copy link

Thank you for the additional testing @tvolpert.

I did a quick test and this is NOT happening on a self-hosted site (with or without the Gutenberg plugin) using Twenty Twenty-Four... so this is something dotcom-specifc.
Screenshot 2024-04-23 at 07 34 03
Screenshot 2024-04-23 at 07 34 10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". [Feature Group] Editor Experience Features related to Gutenberg integration on WordPress.com. [Feature] Post/Page Editor The editor for editing posts and pages. Needs triage Ticket needs to be triaged [Platform] Atomic [Platform] Simple [Pri] Normal Schedule for the next available opportuinity. [Product] WordPress.com All features accessible on and related to WordPress.com. [Status] Priority Review Triggered Quality squad has been notified of this issue in #dotcom-triage-alerts [Type] Bug
Development

Successfully merging a pull request may close this issue.

3 participants