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

[Beta] Incorrect font weight #5443

Open
yousefelgoharyx opened this issue Jan 6, 2023 · 2 comments
Open

[Beta] Incorrect font weight #5443

yousefelgoharyx opened this issue Jan 6, 2023 · 2 comments

Comments

@yousefelgoharyx
Copy link
Contributor

This is the current font weight of paragraphs in the beta docs
image
The computed styles have a font weight of 400 but it is actually 500 because there is no font face for the regular font. there is only a font face for the font of weight 500 and this can be found in index.css that only has the following font faces:

@font-face {
    font-family: 'Source Code Pro';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/Source-Code-Pro-Regular.woff2') format('woff2');
  }

  @font-face {
    font-family: 'Optimistic Display';
    src: url('https://beta.reactjs.org/fonts/Optimistic_Display_W_Lt.woff2')
      format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
  }

  @font-face {
    font-family: 'Optimistic Display';
    src: url('https://beta.reactjs.org/fonts/Optimistic_Display_W_Md.woff2')
      format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
  }

  @font-face {
    font-family: 'Optimistic Display';
    src: url('https://beta.reactjs.org/fonts/Optimistic_Display_W_Bd.woff2')
      format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
  }

The solution would be to add a font face for the regular font because the current font weight for the paragraphs is a bit unreadable.

@yousefelgoharyx
Copy link
Contributor Author

Maybe some won't notice if all weights of Optimistic Display font are installed on their machine thus the font will be shown correctly

@awxiaoxian2020
Copy link
Contributor

Any Response for this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants