From 69818853035adf748b391c198369fc16e945b7ff Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 30 Apr 2023 20:58:32 +0200 Subject: [PATCH] Add `ui-monospace` and `SF Mono` to `--fonts-monospace` (#24442) - Add `ui-monospace` to support Safari 13.4+. - Add `SF Mono` variant to support the font on non-mac. - Quote fonts as per [W3C recommendation](https://www.w3.org/TR/2018/REC-css-fonts-3-20180920/#propdef-font-family). > it is recommended to quote font family names that contain white space, digits, or punctuation characters other than hyphens Fixes: https://github.com/go-gitea/gitea/issues/22125 --- web_src/css/base.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web_src/css/base.css b/web_src/css/base.css index 0aefbd0c3..8e03be143 100644 --- a/web_src/css/base.css +++ b/web_src/css/base.css @@ -1,7 +1,7 @@ :root { /* fonts */ - --fonts-proportional: -apple-system, "Segoe UI", system-ui, "Roboto", "Helvetica Neue", "Arial"; - --fonts-monospace: "SFMono-Regular", "Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", monospace, var(--fonts-emoji); + --fonts-proportional: -apple-system, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial; + --fonts-monospace: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace, var(--fonts-emoji); --fonts-emoji: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla"; /* "font-weight: bold" starts from 700, some fonts do not provide "bolding" for weight 600. */ /* But some users consider "700" is too heavy, so use 601, which is when Segoe UI on Linux */