Skip to content

Commit 20a3b03

Browse files
wxiaoguangsilverwindGiteaBot
authored
Add --font-weight-bold and set previous bold to 601 (#24307)
Fix #24305 According to MDN, "bold" starts from 700, some fonts do not provide "bolding" for weight 600 https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight --------- Co-authored-by: silverwind <[email protected]> Co-authored-by: Giteabot <[email protected]>
1 parent 07aaa14 commit 20a3b03

File tree

11 files changed

+19
-15
lines changed

11 files changed

+19
-15
lines changed

web_src/css/admin.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
}
6060

6161
.admin dl.admin-dl-horizontal dt {
62-
font-weight: 600;
62+
font-weight: var(--font-weight-bold);
6363
float: left;
6464
width: 285px;
6565
clear: left;

web_src/css/base.css

+7-3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
--fonts-proportional: -apple-system, "Segoe UI", system-ui, "Roboto", "Helvetica Neue", "Arial";
44
--fonts-monospace: "SFMono-Regular", "Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", monospace, var(--fonts-emoji);
55
--fonts-emoji: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla";
6+
/* "font-weight: bold" starts from 700, some fonts do not provide "bolding" for weight 600. */
7+
/* But some users consider "700" is too heavy, so use 601, which is when Segoe UI on Linux */
8+
/* starts bolding. */
9+
--font-weight-bold: 601;
610
/* backgrounds */
711
--checkbox-mask-checked: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="-1 -1 18 18" width="16" height="16"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg>');
812
--checkbox-mask-indeterminate: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M2 7.75A.75.75 0 012.75 7h10a.75.75 0 010 1.5h-10A.75.75 0 012 7.75z"></path></svg>');
@@ -211,7 +215,7 @@ h3,
211215
h4,
212216
h5,
213217
h6 {
214-
font-weight: 600;
218+
font-weight: var(--font-weight-bold);
215219
}
216220

217221
body {
@@ -1750,7 +1754,7 @@ img.ui.avatar,
17501754
}
17511755

17521756
.scrolling.menu .item.selected {
1753-
font-weight: 600 !important;
1757+
font-weight: var(--font-weight-bold) !important;
17541758
}
17551759

17561760
.ui.dropdown .scrolling.menu {
@@ -2732,7 +2736,7 @@ table th[data-sortt-desc] .svg {
27322736
.ellipsis-button {
27332737
padding: 0 5px 8px !important;
27342738
display: inline-block !important;
2735-
font-weight: 600 !important;
2739+
font-weight: var(--font-weight-bold) !important;
27362740
line-height: 6px !important;
27372741
vertical-align: middle !important;
27382742
}

web_src/css/chroma/base.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242
/* GenericStrong */
4343
.chroma .gs {
44-
font-weight: 600;
44+
font-weight: var(--font-weight-bold);
4545
}
4646

4747
/* GenericUnderline */

web_src/css/features/imagediff.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
}
2727

2828
.image-diff-container .diff-side-by-side .side .side-header {
29-
font-weight: bold;
29+
font-weight: var(--font-weight-bold);
3030
}
3131

3232
.image-diff-container .diff-swipe {

web_src/css/helpers.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Gitea's private styles use `g-` prefix.
3737
font-size: .95em !important; /* compensate for monospace fonts being usually slightly larger */
3838
}
3939

40-
.gt-bold { font-weight: 600 !important; }
40+
.gt-bold { font-weight: var(--font-weight-bold) !important; }
4141

4242
.gt-word-break {
4343
word-wrap: break-word !important;

web_src/css/install.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
margin: 20px auto;
5656
color: var(--color-red);
5757
text-align: left;
58-
font-weight: bold;
58+
font-weight: var(--font-weight-bold);
5959
}
6060

6161
.page-content.install .ui .reinstall-confirm {

web_src/css/markup/content.css

+3-3
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
.markup h6 {
7171
margin-top: 24px;
7272
margin-bottom: 16px;
73-
font-weight: 600;
73+
font-weight: var(--font-weight-bold);
7474
line-height: 1.25;
7575
}
7676

@@ -248,7 +248,7 @@
248248
margin-top: 16px;
249249
font-size: 1em;
250250
font-style: italic;
251-
font-weight: 600;
251+
font-weight: var(--font-weight-bold);
252252
}
253253

254254
.markup dl dd {
@@ -280,7 +280,7 @@
280280
}
281281

282282
.markup table th {
283-
font-weight: 600;
283+
font-weight: var(--font-weight-bold);
284284
}
285285

286286
.markup table th,

web_src/css/repository.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1561,7 +1561,7 @@
15611561
}
15621562

15631563
.repository .data-table th {
1564-
font-weight: 600;
1564+
font-weight: var(--font-weight-bold);
15651565
background: var(--color-box-header);
15661566
border-top: 0;
15671567
}

web_src/css/shared/issuelist.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
color: var(--color-text);
3434
font-size: 16px;
3535
min-width: 0;
36-
font-weight: 600;
36+
font-weight: var(--font-weight-bold);
3737
}
3838

3939
.issue.list > .item .issue-item-top-row a.index {

web_src/css/user.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.user.profile .ui.card .header {
22
display: block;
3-
font-weight: 600;
3+
font-weight: var(--font-weight-bold);
44
font-size: 1.3rem;
55
margin-top: -0.2rem;
66
line-height: 1.3rem;

web_src/js/components/DashboardRepoList.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
<a class="repo-list-link gt-df gt-ac gt-sb" :href="repo.link">
7575
<div class="item-name gt-df gt-ac gt-f1">
7676
<svg-icon :name="repoIcon(repo)" :size="16" class-name="gt-mr-2"/>
77-
<div class="text gt-bold truncate gt-ml-1">{{ repo.full_name }}</div>
77+
<div class="text truncate gt-ml-1">{{ repo.full_name }}</div>
7878
<span v-if="repo.archived">
7979
<svg-icon name="octicon-archive" :size="16" class-name="gt-ml-2"/>
8080
</span>

0 commit comments

Comments
 (0)