From 5729d3177d4b5def77b05c3b32efc731a9539c11 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Thu, 5 Aug 2021 15:03:19 -0700 Subject: [PATCH] Add font-display: block to default templates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: https://github.com/GoogleChrome/lighthouse/issues/10127#issuecomment-567093362. Signed-off-by: Anders Kaseorg --- templates/css.hbs | 1 + templates/scss.hbs | 1 + 2 files changed, 2 insertions(+) diff --git a/templates/css.hbs b/templates/css.hbs index 8d20f08..7fa00c4 100644 --- a/templates/css.hbs +++ b/templates/css.hbs @@ -1,5 +1,6 @@ @font-face { font-family: "{{fontName}}"; + font-display: block; src: {{{src}}}; } diff --git a/templates/scss.hbs b/templates/scss.hbs index 7d73ca2..fdb0248 100644 --- a/templates/scss.hbs +++ b/templates/scss.hbs @@ -1,5 +1,6 @@ @font-face { font-family: "{{fontName}}"; + font-display: block; src: {{{src}}}; }