diff options
| author | Shulhan <ms@kilabit.info> | 2023-10-16 00:25:20 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2023-10-16 00:25:20 +0700 |
| commit | dba7fb6de3755924a5278ee34332d29212884493 (patch) | |
| tree | 049096c6c332ed4d7c47bfc9e16ba49e3e7336a3 /_content/index.css | |
| parent | 7c082605495f473c18491dbbd52e37c358284a9f (diff) | |
| download | kilabit.info-dba7fb6de3755924a5278ee34332d29212884493.tar.xz | |
all: improve the web rendering based on result from webpagetest.org
Changes,
* In CSS, use "font-display:swap" [1]. This allow browser use fallback
font first and changes to target font once the file downloaded.
* In HTML, add "lang=en"
* Load CSS asynchronously using `media="print" onload="this.media='all'"`
* Set empty alt text for decorative image
* Set width and height for image ratio
[1] https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display
Diffstat (limited to '_content/index.css')
| -rw-r--r-- | _content/index.css | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/_content/index.css b/_content/index.css index f499c10..cfb8af6 100644 --- a/_content/index.css +++ b/_content/index.css @@ -1,4 +1,5 @@ @font-face { + font-display: swap; font-family: "Go"; src: local("Go Regular"), @@ -11,6 +12,7 @@ } @font-face { + font-display: swap; font-family: "Go"; src: local("Go Bold"), @@ -23,6 +25,7 @@ } @font-face { + font-display: swap; font-family: "Go"; src: local("Go Italic"), @@ -35,6 +38,7 @@ } @font-face { + font-display: swap; font-family: "Go"; src: local("Go Bold Italic"), @@ -47,6 +51,7 @@ } @font-face { + font-display: swap; font-family: "Go"; src: local("Go Medium"), @@ -59,6 +64,7 @@ } @font-face { + font-display: swap; font-family: "Go"; src: local("Go Medium Italic"), @@ -71,6 +77,7 @@ } @font-face { + font-display: swap; font-family: "Go Mono"; src: local("Go Mono"), @@ -83,6 +90,7 @@ } @font-face { + font-display: swap; font-family: "Go Mono"; src: local("Go Mono Bold Italic"), @@ -95,6 +103,7 @@ } @font-face { + font-display: swap; font-family: "Go Mono"; src: local("Go Mono Italic"), @@ -107,6 +116,7 @@ } @font-face { + font-display: swap; font-family: "Go Mono"; src: local("Go Mono Bold"), @@ -119,6 +129,7 @@ } @font-face { + font-display: swap; font-family: "Go Smallcaps"; src: local("Go Smallcaps Italic"), @@ -131,6 +142,7 @@ } @font-face { + font-display: swap; font-family: "Go Smallcaps"; src: local("Go Smallcaps"), |
