Skip to content

Files

Latest commit

 

History

History
25 lines (19 loc) · 549 Bytes

google-font-display.md

File metadata and controls

25 lines (19 loc) · 549 Bytes

Pattern: Missing font-display strategy

Issue: -

Description

Google Fonts links should include a display parameter to control font loading behavior. Using display=optional or display=swap helps prevent invisible text and layout shifts during font loading.

Examples

Example of incorrect code:

<link 
  href="https://fonts.googleapis.com/css2?family=Roboto" 
  rel="stylesheet" 
/>

Example of correct code:

<link 
  href="https://fonts.googleapis.com/css2?family=Roboto&display=optional" 
  rel="stylesheet"
/>