reactjs / reactjs/react.dev

[Beta] Incorrect font weight

Aperta
#5,443 2 commenti 2 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
JavaScript
Stelle
11.8k
Fork
7.9k
Merge medio
1g 11h
PR unite (30g)
11

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia in index.css e ispeziona le dichiarazioni @font-face di Optimistic Display mostrate nell’issue. Aggiungi il carattere regular mancante, quindi verifica che i paragrafi della documentazione beta utilizzino il peso regular previsto e siano più leggibili nel browser.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
css
Ambito
documentation, frontend
Tipo di issue
Bug
Difficoltà
2/5
Tempo stimato
1-3 ore
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.