From 7dc7454e6ca4f00be9df564303dab11def38f683 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Mon, 24 Apr 2023 23:17:48 +0800 Subject: [PATCH 1/4] fix --- web_src/css/admin.css | 2 +- web_src/css/base.css | 9 ++++++--- web_src/css/chroma/base.css | 2 +- web_src/css/features/imagediff.css | 2 +- web_src/css/helpers.css | 2 +- web_src/css/install.css | 2 +- web_src/css/markup/content.css | 6 +++--- web_src/css/repository.css | 2 +- web_src/css/shared/issuelist.css | 2 +- web_src/css/user.css | 2 +- 10 files changed, 17 insertions(+), 14 deletions(-) diff --git a/web_src/css/admin.css b/web_src/css/admin.css index 00ed675e2d572..a07a63b11ea43 100644 --- a/web_src/css/admin.css +++ b/web_src/css/admin.css @@ -59,7 +59,7 @@ } .admin dl.admin-dl-horizontal dt { - font-weight: 600; + font-weight: var(--font-weight-bold); float: left; width: 285px; clear: left; diff --git a/web_src/css/base.css b/web_src/css/base.css index 42263a974ff5a..35d2db234793f 100644 --- a/web_src/css/base.css +++ b/web_src/css/base.css @@ -3,6 +3,9 @@ --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-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 610 here to bypass some font's rule, eg: "Segoe UI" starts bolding from 601. */ + --font-weight-bold: 610; /* backgrounds */ --checkbox-mask-checked: url('data:image/svg+xml;utf8,'); --checkbox-mask-indeterminate: url('data:image/svg+xml;utf8,'); @@ -211,7 +214,7 @@ h3, h4, h5, h6 { - font-weight: 600; + font-weight: var(--font-weight-bold); } body { @@ -1750,7 +1753,7 @@ img.ui.avatar, } .scrolling.menu .item.selected { - font-weight: 600 !important; + font-weight: var(--font-weight-bold) !important; } .ui.dropdown .scrolling.menu { @@ -2732,7 +2735,7 @@ table th[data-sortt-desc] .svg { .ellipsis-button { padding: 0 5px 8px !important; display: inline-block !important; - font-weight: 600 !important; + font-weight: var(--font-weight-bold) !important; line-height: 6px !important; vertical-align: middle !important; } diff --git a/web_src/css/chroma/base.css b/web_src/css/chroma/base.css index bfd49db7a433a..f1db1993fefe4 100644 --- a/web_src/css/chroma/base.css +++ b/web_src/css/chroma/base.css @@ -41,7 +41,7 @@ /* GenericStrong */ .chroma .gs { - font-weight: 600; + font-weight: var(--font-weight-bold); } /* GenericUnderline */ diff --git a/web_src/css/features/imagediff.css b/web_src/css/features/imagediff.css index f796bc19aea2b..244ec5a96f53b 100644 --- a/web_src/css/features/imagediff.css +++ b/web_src/css/features/imagediff.css @@ -26,7 +26,7 @@ } .image-diff-container .diff-side-by-side .side .side-header { - font-weight: bold; + font-weight: var(--font-weight-bold); } .image-diff-container .diff-swipe { diff --git a/web_src/css/helpers.css b/web_src/css/helpers.css index c69b4d545004f..750ec44229f53 100644 --- a/web_src/css/helpers.css +++ b/web_src/css/helpers.css @@ -37,7 +37,7 @@ Gitea's private styles use `g-` prefix. font-size: .95em !important; /* compensate for monospace fonts being usually slightly larger */ } -.gt-bold { font-weight: 600 !important; } +.gt-bold { font-weight: var(--font-weight-bold) !important; } .gt-word-break { word-wrap: break-word !important; diff --git a/web_src/css/install.css b/web_src/css/install.css index b936ba66fd646..d99805b80f421 100644 --- a/web_src/css/install.css +++ b/web_src/css/install.css @@ -55,7 +55,7 @@ margin: 20px auto; color: var(--color-red); text-align: left; - font-weight: bold; + font-weight: var(--font-weight-bold); } .page-content.install .ui .reinstall-confirm { diff --git a/web_src/css/markup/content.css b/web_src/css/markup/content.css index d0f11e8e76500..db67ac4263d26 100644 --- a/web_src/css/markup/content.css +++ b/web_src/css/markup/content.css @@ -70,7 +70,7 @@ .markup h6 { margin-top: 24px; margin-bottom: 16px; - font-weight: 600; + font-weight: var(--font-weight-bold); line-height: 1.25; } @@ -248,7 +248,7 @@ margin-top: 16px; font-size: 1em; font-style: italic; - font-weight: 600; + font-weight: var(--font-weight-bold); } .markup dl dd { @@ -280,7 +280,7 @@ } .markup table th { - font-weight: 600; + font-weight: var(--font-weight-bold); } .markup table th, diff --git a/web_src/css/repository.css b/web_src/css/repository.css index 42dd3e9e34082..496e517bc87a3 100644 --- a/web_src/css/repository.css +++ b/web_src/css/repository.css @@ -1561,7 +1561,7 @@ } .repository .data-table th { - font-weight: 600; + font-weight: var(--font-weight-bold); background: var(--color-box-header); border-top: 0; } diff --git a/web_src/css/shared/issuelist.css b/web_src/css/shared/issuelist.css index 26affd98a093d..c214406752ccc 100644 --- a/web_src/css/shared/issuelist.css +++ b/web_src/css/shared/issuelist.css @@ -33,7 +33,7 @@ color: var(--color-text); font-size: 16px; min-width: 0; - font-weight: 600; + font-weight: var(--font-weight-bold); } .issue.list > .item .issue-item-top-row a.index { diff --git a/web_src/css/user.css b/web_src/css/user.css index 51a8943355c0f..2a3fe1beaf448 100644 --- a/web_src/css/user.css +++ b/web_src/css/user.css @@ -1,6 +1,6 @@ .user.profile .ui.card .header { display: block; - font-weight: 600; + font-weight: var(--font-weight-bold); font-size: 1.3rem; margin-top: -0.2rem; line-height: 1.3rem; From 0794411b944b95c5ca32335701e759d52ad97056 Mon Sep 17 00:00:00 2001 From: silverwind Date: Mon, 24 Apr 2023 18:08:10 +0200 Subject: [PATCH 2/4] Update web_src/css/base.css --- web_src/css/base.css | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/web_src/css/base.css b/web_src/css/base.css index 35d2db234793f..39aa37a4375c8 100644 --- a/web_src/css/base.css +++ b/web_src/css/base.css @@ -3,9 +3,10 @@ --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-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 610 here to bypass some font's rule, eg: "Segoe UI" starts bolding from 601. */ - --font-weight-bold: 610; + /* "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 */ + /* starts bolding. */ + --font-weight-bold: 601; /* backgrounds */ --checkbox-mask-checked: url('data:image/svg+xml;utf8,'); --checkbox-mask-indeterminate: url('data:image/svg+xml;utf8,'); From e26002a9b19fecd228c934709935125abad8a844 Mon Sep 17 00:00:00 2001 From: silverwind Date: Mon, 24 Apr 2023 19:01:20 +0200 Subject: [PATCH 3/4] add semibold and use it on dashboard repolist --- web_src/css/base.css | 1 + web_src/css/helpers.css | 1 + web_src/js/components/DashboardRepoList.vue | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/web_src/css/base.css b/web_src/css/base.css index 39aa37a4375c8..a0c15dcf887d0 100644 --- a/web_src/css/base.css +++ b/web_src/css/base.css @@ -7,6 +7,7 @@ /* But some users consider "700" is too heavy, so use 601, which is when Segoe UI on Linux */ /* starts bolding. */ --font-weight-bold: 601; + --font-weight-semibold: 500; /* backgrounds */ --checkbox-mask-checked: url('data:image/svg+xml;utf8,'); --checkbox-mask-indeterminate: url('data:image/svg+xml;utf8,'); diff --git a/web_src/css/helpers.css b/web_src/css/helpers.css index 750ec44229f53..88eff7164852f 100644 --- a/web_src/css/helpers.css +++ b/web_src/css/helpers.css @@ -38,6 +38,7 @@ Gitea's private styles use `g-` prefix. } .gt-bold { font-weight: var(--font-weight-bold) !important; } +.gt-semibold { font-weight: var(--font-weight-semibold) !important; } .gt-word-break { word-wrap: break-word !important; diff --git a/web_src/js/components/DashboardRepoList.vue b/web_src/js/components/DashboardRepoList.vue index 1af53aac902b0..c7097105e2bc3 100644 --- a/web_src/js/components/DashboardRepoList.vue +++ b/web_src/js/components/DashboardRepoList.vue @@ -74,7 +74,7 @@
-
{{ repo.full_name }}
+
{{ repo.full_name }}
From f3a2e5c6d848a5ecf1483487aac58c87066206c4 Mon Sep 17 00:00:00 2001 From: silverwind Date: Mon, 24 Apr 2023 19:16:04 +0200 Subject: [PATCH 4/4] remove semibold --- web_src/css/base.css | 1 - web_src/css/helpers.css | 1 - web_src/js/components/DashboardRepoList.vue | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/web_src/css/base.css b/web_src/css/base.css index a0c15dcf887d0..39aa37a4375c8 100644 --- a/web_src/css/base.css +++ b/web_src/css/base.css @@ -7,7 +7,6 @@ /* But some users consider "700" is too heavy, so use 601, which is when Segoe UI on Linux */ /* starts bolding. */ --font-weight-bold: 601; - --font-weight-semibold: 500; /* backgrounds */ --checkbox-mask-checked: url('data:image/svg+xml;utf8,'); --checkbox-mask-indeterminate: url('data:image/svg+xml;utf8,'); diff --git a/web_src/css/helpers.css b/web_src/css/helpers.css index 88eff7164852f..750ec44229f53 100644 --- a/web_src/css/helpers.css +++ b/web_src/css/helpers.css @@ -38,7 +38,6 @@ Gitea's private styles use `g-` prefix. } .gt-bold { font-weight: var(--font-weight-bold) !important; } -.gt-semibold { font-weight: var(--font-weight-semibold) !important; } .gt-word-break { word-wrap: break-word !important; diff --git a/web_src/js/components/DashboardRepoList.vue b/web_src/js/components/DashboardRepoList.vue index c7097105e2bc3..a3a02ecadb754 100644 --- a/web_src/js/components/DashboardRepoList.vue +++ b/web_src/js/components/DashboardRepoList.vue @@ -74,7 +74,7 @@
-
{{ repo.full_name }}
+
{{ repo.full_name }}