Skip to content

Commit 5f82011

Browse files
authored
Add --font-weight-bold and set previous bold to 601 (#24307) (#24331)
Backport #24307 Fix #24305 According to MDN, "bold" starts from 700, some fonts do not provide "bolding" for weight 600 Manually backport, no CSS conflict.
1 parent 1bbbeb2 commit 5f82011

File tree

10 files changed

+18
-14
lines changed

10 files changed

+18
-14
lines changed

web_src/css/admin.css

Lines changed: 1 addition & 1 deletion
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

Lines changed: 7 additions & 3 deletions
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 {
@@ -1792,7 +1796,7 @@ img.ui.avatar,
17921796
}
17931797

17941798
.scrolling.menu .item.selected {
1795-
font-weight: 600 !important;
1799+
font-weight: var(--font-weight-bold) !important;
17961800
}
17971801

17981802
.ui.dropdown .scrolling.menu {
@@ -2787,7 +2791,7 @@ table th[data-sortt-desc] .svg {
27872791
.ellipsis-button {
27882792
padding: 0 5px 8px !important;
27892793
display: inline-block !important;
2790-
font-weight: 600 !important;
2794+
font-weight: var(--font-weight-bold) !important;
27912795
line-height: 6px !important;
27922796
vertical-align: middle !important;
27932797
}

web_src/css/chroma/base.css

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
font-size: .9em !important; /* compensate for monospace fonts being usually slightly larger */
3030
}
3131

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

3434
.gt-word-break {
3535
word-wrap: break-word !important;

web_src/css/install.css

Lines changed: 1 addition & 1 deletion
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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
.markup h6 {
7979
margin-top: 24px;
8080
margin-bottom: 16px;
81-
font-weight: 600;
81+
font-weight: var(--font-weight-bold);
8282
line-height: 1.25;
8383
}
8484

@@ -256,7 +256,7 @@
256256
margin-top: 16px;
257257
font-size: 1em;
258258
font-style: italic;
259-
font-weight: 600;
259+
font-weight: var(--font-weight-bold);
260260
}
261261

262262
.markup dl dd {
@@ -288,7 +288,7 @@
288288
}
289289

290290
.markup table th {
291-
font-weight: 600;
291+
font-weight: var(--font-weight-bold);
292292
}
293293

294294
.markup table th,

web_src/css/repository.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1566,7 +1566,7 @@
15661566
}
15671567

15681568
.repository .data-table th {
1569-
font-weight: 600;
1569+
font-weight: var(--font-weight-bold);
15701570
background: var(--color-box-header);
15711571
border-top: 0;
15721572
}

web_src/css/shared/issuelist.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
color: var(--color-text);
3838
font-size: 16px;
3939
min-width: 0;
40-
font-weight: 600;
40+
font-weight: var(--font-weight-bold);
4141
}
4242

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

web_src/css/user.css

Lines changed: 1 addition & 1 deletion
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;

0 commit comments

Comments
 (0)