From 64e0672e3b66edefa5c5403002110b9ba25868f2 Mon Sep 17 00:00:00 2001 From: silverwind Date: Wed, 24 May 2023 03:48:51 +0200 Subject: [PATCH] Fix `@font-face` overrides (#24855) Fixes: https://github.com/go-gitea/gitea/issues/24850 Not sure how to do it for asian fonts only, so let's revert to previous value for now. ### Before Screenshot 2023-05-22 at 10 34 10 ### After Screenshot 2023-05-22 at 10 34 04 --- .stylelintrc.yaml | 2 +- web_src/css/font_i18n.css | 40 +++++++++++++++++++-------------------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.stylelintrc.yaml b/.stylelintrc.yaml index a9854de4e8..4e2315ac95 100644 --- a/.stylelintrc.yaml +++ b/.stylelintrc.yaml @@ -5,7 +5,7 @@ ignoreFiles: - "**/*.go" overrides: - - files: ["**/chroma/*", "**/codemirror/*", "**/standalone/*", "**/console.css"] + - files: ["**/chroma/*", "**/codemirror/*", "**/standalone/*", "**/console.css", "font_i18n.css"] rules: scale-unlimited/declaration-strict-value: null - files: ["**/chroma/*", "**/codemirror/*"] diff --git a/web_src/css/font_i18n.css b/web_src/css/font_i18n.css index 187fa292c7..0ac4c83b58 100644 --- a/web_src/css/font_i18n.css +++ b/web_src/css/font_i18n.css @@ -51,7 +51,7 @@ local("SourceHanSans-Light"), local("Yu Gothic Regular"), local("YuGothic Regular"), local("Droid Sans Japanese"), local("Meiryo"), local("MS PGothic"); - font-weight: var(--font-weight-light); + font-weight: 300; unicode-range: U+11??, U+2E80-4DBF, U+4E00-9FFF, U+A960-A97F, U+AC00-D7FF, U+F900-FAFF, U+FE00-FE6F, U+FF00-FFEF, U+1F2??, U+2????; } @@ -66,7 +66,7 @@ local("SourceHanSans-Regular"), local("Yu Gothic Medium"), local("YuGothic Medium"), local("Droid Sans Japanese"), local("Meiryo"), local("MS PGothic"); - font-weight: var(--font-weight-normal); + font-weight: 400; unicode-range: U+11??, U+2E80-4DBF, U+4E00-9FFF, U+A960-A97F, U+AC00-D7FF, U+F900-FAFF, U+FE00-FE6F, U+FF00-FFEF, U+1F2??, U+2????; } @@ -81,7 +81,7 @@ local("SourceHanSans-Medium"), local("Yu Gothic Medium"), local("YuGothic Medium"), local("Droid Sans Japanese"), local("Meiryo"), local("MS PGothic"); - font-weight: var(--font-weight-medium); + font-weight: 500; unicode-range: U+11??, U+2E80-4DBF, U+4E00-9FFF, U+A960-A97F, U+AC00-D7FF, U+F900-FAFF, U+FE00-FE6F, U+FF00-FFEF, U+1F2??, U+2????; } @@ -95,7 +95,7 @@ local("NotoSansCJKJP-Bold"), local("Source Han Sans Bold"), local("SourceHanSans-Bold"), local("Yu Gothic Bold"), local("YuGothic Bold"), local("Droid Sans Japanese"), local("Meiryo Bold"), local("MS PGothic"); - font-weight: var(--font-weight-semibold); + font-weight: 600; unicode-range: U+11??, U+2E80-4DBF, U+4E00-9FFF, U+A960-A97F, U+AC00-D7FF, U+F900-FAFF, U+FE00-FE6F, U+FF00-FFEF, U+1F2??, U+2????; } @@ -124,7 +124,7 @@ local("NotoSansCJKSC-Light"), local("HiraginoSansGB-W3"), local("Hiragino Sans GB W3"), local("Microsoft YaHei Light"), local("Heiti SC Light"), local("SimHei"); - font-weight: var(--font-weight-light); + font-weight: 300; unicode-range: U+11??, U+2E80-4DBF, U+4E00-9FFF, U+A960-A97F, U+AC00-D7FF, U+F900-FAFF, U+FE00-FE6F, U+FF00-FFEF, U+1F2??, U+2????; } @@ -137,7 +137,7 @@ local("NotoSansCJKSC-Regular"), local("HiraginoSansGB-W3"), local("Hiragino Sans GB W3"), local("Microsoft YaHei"), local("Heiti SC Light"), local("SimHei"); - font-weight: var(--font-weight-normal); + font-weight: 400; unicode-range: U+11??, U+2E80-4DBF, U+4E00-9FFF, U+A960-A97F, U+AC00-D7FF, U+F900-FAFF, U+FE00-FE6F, U+FF00-FFEF, U+1F2??, U+2????; } @@ -150,7 +150,7 @@ local("NotoSansCJKSC-Medium"), local("HiraginoSansGB-W3"), local("Hiragino Sans GB W3"), local("Microsoft YaHei"), local("Heiti SC Light"), local("SimHei"); - font-weight: var(--font-weight-medium); + font-weight: 500; unicode-range: U+11??, U+2E80-4DBF, U+4E00-9FFF, U+A960-A97F, U+AC00-D7FF, U+F900-FAFF, U+FE00-FE6F, U+FF00-FFEF, U+1F2??, U+2????; } @@ -163,7 +163,7 @@ local("NotoSansCJKSC-Bold"), local("HiraginoSansGB-W6"), local("Hiragino Sans GB W6"), local("Microsoft YaHei Bold"), local("Heiti SC Medium"), local("SimHei"); - font-weight: var(--font-weight-semibold); + font-weight: 600; unicode-range: U+11??, U+2E80-4DBF, U+4E00-9FFF, U+A960-A97F, U+AC00-D7FF, U+F900-FAFF, U+FE00-FE6F, U+FF00-FFEF, U+1F2??, U+2????; } @@ -192,7 +192,7 @@ local("NotoSansCJKTC-Light"), local("HiraginoSansTC-W3"), local("Hiragino Sans TC W3"), local("Microsoft JhengHei Light"), local("Heiti TC Light"), local("PMingLiU"); - font-weight: var(--font-weight-light); + font-weight: 300; unicode-range: U+11??, U+2E80-4DBF, U+4E00-9FFF, U+A960-A97F, U+AC00-D7FF, U+F900-FAFF, U+FE00-FE6F, U+FF00-FFEF, U+1F2??, U+2????; } @@ -205,7 +205,7 @@ local("NotoSansCJKTC-Regular"), local("HiraginoSansTC-W3"), local("Hiragino Sans TC W3"), local("Microsoft JhengHei"), local("Heiti TC Light"), local("PMingLiU"); - font-weight: var(--font-weight-normal); + font-weight: 400; unicode-range: U+11??, U+2E80-4DBF, U+4E00-9FFF, U+A960-A97F, U+AC00-D7FF, U+F900-FAFF, U+FE00-FE6F, U+FF00-FFEF, U+1F2??, U+2????; } @@ -218,7 +218,7 @@ local("NotoSansCJKTC-Medium"), local("HiraginoSansTC-W3"), local("Hiragino Sans TC W3"), local("Microsoft JhengHei"), local("Heiti TC Light"), local("PMingLiU"); - font-weight: var(--font-weight-medium); + font-weight: 500; unicode-range: U+11??, U+2E80-4DBF, U+4E00-9FFF, U+A960-A97F, U+AC00-D7FF, U+F900-FAFF, U+FE00-FE6F, U+FF00-FFEF, U+1F2??, U+2????; } @@ -231,7 +231,7 @@ local("NotoSansCJKTC-Bold"), local("HiraginoSansTC-W6"), local("Hiragino Sans TC W6"), local("Microsoft JhengHei Bold"), local("Heiti TC Medium"), local("PMingLiU"); - font-weight: var(--font-weight-semibold); + font-weight: 600; unicode-range: U+11??, U+2E80-4DBF, U+4E00-9FFF, U+A960-A97F, U+AC00-D7FF, U+F900-FAFF, U+FE00-FE6F, U+FF00-FFEF, U+1F2??, U+2????; } @@ -262,7 +262,7 @@ local("NotoSansCJKTC-Light"), local("HiraginoSansTC-W3"), local("Hiragino Sans TC W3"), local("Microsoft JhengHei Light"), local("Heiti TC Light"), local("PMingLiU_HKSCS"), local("PMingLiU"); - font-weight: var(--font-weight-light); + font-weight: 300; unicode-range: U+11??, U+2E80-4DBF, U+4E00-9FFF, U+A960-A97F, U+AC00-D7FF, U+F900-FAFF, U+FE00-FE6F, U+FF00-FFEF, U+1F2??, U+2????; } @@ -277,7 +277,7 @@ local("NotoSansCJKTC-Regular"), local("HiraginoSansTC-W3"), local("Hiragino Sans TC W3"), local("Microsoft JhengHei"), local("Heiti TC Light"), local("PMingLiU_HKSCS"), local("PMingLiU"); - font-weight: var(--font-weight-normal); + font-weight: 400; unicode-range: U+11??, U+2E80-4DBF, U+4E00-9FFF, U+A960-A97F, U+AC00-D7FF, U+F900-FAFF, U+FE00-FE6F, U+FF00-FFEF, U+1F2??, U+2????; } @@ -292,7 +292,7 @@ local("NotoSansCJKTC-Medium"), local("HiraginoSansTC-W3"), local("Hiragino Sans TC W3"), local("Microsoft JhengHei"), local("Heiti TC Light"), local("PMingLiU_HKSCS"), local("PMingLiU"); - font-weight: var(--font-weight-medium); + font-weight: 500; unicode-range: U+11??, U+2E80-4DBF, U+4E00-9FFF, U+A960-A97F, U+AC00-D7FF, U+F900-FAFF, U+FE00-FE6F, U+FF00-FFEF, U+1F2??, U+2????; } @@ -307,7 +307,7 @@ local("NotoSansCJKTC-Bold"), local("HiraginoSansTC-W6"), local("Hiragino Sans TC W6"), local("Microsoft JhengHei Bold"), local("Heiti TC Medium"), local("PMingLiU_HKSCS"), local("PMingLiU"); - font-weight: var(--font-weight-semibold); + font-weight: 600; unicode-range: U+11??, U+2E80-4DBF, U+4E00-9FFF, U+A960-A97F, U+AC00-D7FF, U+F900-FAFF, U+FE00-FE6F, U+FF00-FFEF, U+1F2??, U+2????; } @@ -335,7 +335,7 @@ local("SourceHanSansK-Light"), local("Noto Sans CJK KR Light"), local("NotoSansCJKKR-Light"), local("NanumBarunGothic Light"), local("Malgun Gothic Semilight"), local("Nanum Gothic"), local("Dotum"); - font-weight: var(--font-weight-light); + font-weight: 300; unicode-range: U+11??, U+2E80-4DBF, U+4E00-9FFF, U+A960-A97F, U+AC00-D7FF, U+F900-FAFF, U+FE00-FE6F, U+FF00-FFEF, U+1F2??, U+2????; } @@ -347,7 +347,7 @@ local("SourceHanSansK-Regular"), local("Noto Sans CJK KR Regular"), local("NotoSansCJKKR-Regular"), local("NanumBarunGothic"), local("Malgun Gothic"), local("Nanum Gothic"), local("Dotum"); - font-weight: var(--font-weight-normal); + font-weight: 400; unicode-range: U+11??, U+2E80-4DBF, U+4E00-9FFF, U+A960-A97F, U+AC00-D7FF, U+F900-FAFF, U+FE00-FE6F, U+FF00-FFEF, U+1F2??, U+2????; } @@ -359,7 +359,7 @@ local("SourceHanSansK-Medium"), local("Noto Sans CJK KR Medium"), local("NotoSansCJKKR-Medium"), local("NanumBarunGothic"), local("Malgun Gothic"), local("Nanum Gothic"), local("Dotum"); - font-weight: var(--font-weight-medium); + font-weight: 500; unicode-range: U+11??, U+2E80-4DBF, U+4E00-9FFF, U+A960-A97F, U+AC00-D7FF, U+F900-FAFF, U+FE00-FE6F, U+FF00-FFEF, U+1F2??, U+2????; } @@ -371,7 +371,7 @@ local("SourceHanSansK-Bold"), local("Noto Sans CJK KR Bold"), local("NotoSansCJKKR-Bold"), local("NanumBarunGothic Bold"), local("Malgun Gothic Bold"), local("Nanum Gothic Bold"), local("Dotum"); - font-weight: var(--font-weight-semibold); + font-weight: 600; unicode-range: U+11??, U+2E80-4DBF, U+4E00-9FFF, U+A960-A97F, U+AC00-D7FF, U+F900-FAFF, U+FE00-FE6F, U+FF00-FFEF, U+1F2??, U+2????; }