0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-14 22:11:32 +01:00

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 <me@silverwind.io>
Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
wxiaoguang 2023-04-25 01:46:00 +08:00 committed by GitHub
parent 07aaa145dc
commit 20a3b03fe5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 19 additions and 15 deletions

View file

@ -59,7 +59,7 @@
} }
.admin dl.admin-dl-horizontal dt { .admin dl.admin-dl-horizontal dt {
font-weight: 600; font-weight: var(--font-weight-bold);
float: left; float: left;
width: 285px; width: 285px;
clear: left; clear: left;

View file

@ -3,6 +3,10 @@
--fonts-proportional: -apple-system, "Segoe UI", system-ui, "Roboto", "Helvetica Neue", "Arial"; --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-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"; --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 */
/* starts bolding. */
--font-weight-bold: 601;
/* backgrounds */ /* backgrounds */
--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>'); --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>');
--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>'); --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,
h4, h4,
h5, h5,
h6 { h6 {
font-weight: 600; font-weight: var(--font-weight-bold);
} }
body { body {
@ -1750,7 +1754,7 @@ img.ui.avatar,
} }
.scrolling.menu .item.selected { .scrolling.menu .item.selected {
font-weight: 600 !important; font-weight: var(--font-weight-bold) !important;
} }
.ui.dropdown .scrolling.menu { .ui.dropdown .scrolling.menu {
@ -2732,7 +2736,7 @@ table th[data-sortt-desc] .svg {
.ellipsis-button { .ellipsis-button {
padding: 0 5px 8px !important; padding: 0 5px 8px !important;
display: inline-block !important; display: inline-block !important;
font-weight: 600 !important; font-weight: var(--font-weight-bold) !important;
line-height: 6px !important; line-height: 6px !important;
vertical-align: middle !important; vertical-align: middle !important;
} }

View file

@ -41,7 +41,7 @@
/* GenericStrong */ /* GenericStrong */
.chroma .gs { .chroma .gs {
font-weight: 600; font-weight: var(--font-weight-bold);
} }
/* GenericUnderline */ /* GenericUnderline */

View file

@ -26,7 +26,7 @@
} }
.image-diff-container .diff-side-by-side .side .side-header { .image-diff-container .diff-side-by-side .side .side-header {
font-weight: bold; font-weight: var(--font-weight-bold);
} }
.image-diff-container .diff-swipe { .image-diff-container .diff-swipe {

View file

@ -37,7 +37,7 @@ Gitea's private styles use `g-` prefix.
font-size: .95em !important; /* compensate for monospace fonts being usually slightly larger */ 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 { .gt-word-break {
word-wrap: break-word !important; word-wrap: break-word !important;

View file

@ -55,7 +55,7 @@
margin: 20px auto; margin: 20px auto;
color: var(--color-red); color: var(--color-red);
text-align: left; text-align: left;
font-weight: bold; font-weight: var(--font-weight-bold);
} }
.page-content.install .ui .reinstall-confirm { .page-content.install .ui .reinstall-confirm {

View file

@ -70,7 +70,7 @@
.markup h6 { .markup h6 {
margin-top: 24px; margin-top: 24px;
margin-bottom: 16px; margin-bottom: 16px;
font-weight: 600; font-weight: var(--font-weight-bold);
line-height: 1.25; line-height: 1.25;
} }
@ -248,7 +248,7 @@
margin-top: 16px; margin-top: 16px;
font-size: 1em; font-size: 1em;
font-style: italic; font-style: italic;
font-weight: 600; font-weight: var(--font-weight-bold);
} }
.markup dl dd { .markup dl dd {
@ -280,7 +280,7 @@
} }
.markup table th { .markup table th {
font-weight: 600; font-weight: var(--font-weight-bold);
} }
.markup table th, .markup table th,

View file

@ -1561,7 +1561,7 @@
} }
.repository .data-table th { .repository .data-table th {
font-weight: 600; font-weight: var(--font-weight-bold);
background: var(--color-box-header); background: var(--color-box-header);
border-top: 0; border-top: 0;
} }

View file

@ -33,7 +33,7 @@
color: var(--color-text); color: var(--color-text);
font-size: 16px; font-size: 16px;
min-width: 0; min-width: 0;
font-weight: 600; font-weight: var(--font-weight-bold);
} }
.issue.list > .item .issue-item-top-row a.index { .issue.list > .item .issue-item-top-row a.index {

View file

@ -1,6 +1,6 @@
.user.profile .ui.card .header { .user.profile .ui.card .header {
display: block; display: block;
font-weight: 600; font-weight: var(--font-weight-bold);
font-size: 1.3rem; font-size: 1.3rem;
margin-top: -0.2rem; margin-top: -0.2rem;
line-height: 1.3rem; line-height: 1.3rem;

View file

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