Skip to content

Commit

Permalink
Add font-display: block to default templates
Browse files Browse the repository at this point in the history
It’s not helpful for the browser to substitute another font for the
icon font while it’s loading.

This suppresses a warning from the Lighthouse performance analyzer:
GoogleChrome/lighthouse#10127 (comment).

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
  • Loading branch information
andersk committed Aug 5, 2021
1 parent eaa70ed commit 5729d31
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions templates/css.hbs
@@ -1,5 +1,6 @@
@font-face {
font-family: "{{fontName}}";
font-display: block;
src: {{{src}}};
}

Expand Down
1 change: 1 addition & 0 deletions templates/scss.hbs
@@ -1,5 +1,6 @@
@font-face {
font-family: "{{fontName}}";
font-display: block;
src: {{{src}}};
}

Expand Down

0 comments on commit 5729d31

Please sign in to comment.