summaryrefslogtreecommitdiffstats
path: root/web_src/less
diff options
context:
space:
mode:
authorYarden Shoham <hrsi88@gmail.com>2022-10-15 21:24:41 +0300
committerGitHub <noreply@github.com>2022-10-16 02:24:41 +0800
commitb9cd6fb70370b97496e03c61be35e0d3ceedc52d (patch)
tree954ec4f87da6f2de8405f2395cc2283ea49b722e /web_src/less
parent671c609c465f02d7ac5023bb8491694a9f4768f5 (diff)
downloadgitea-b9cd6fb70370b97496e03c61be35e0d3ceedc52d.tar.gz
gitea-b9cd6fb70370b97496e03c61be35e0d3ceedc52d.zip
Add `code` highlighting in issue titles (#21432)
This changes the rendering logic of issue titles. If a substring in an issue title is enclosed with a pair of backticks, it'll be rendered with a monospace font (HTML `code` tag). * Closes #20887 Signed-off-by: Yarden Shoham <hrsi88@gmail.com> Co-authored-by: Gusted <williamzijl7@hotmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: 6543 <6543@obermui.de>
Diffstat (limited to 'web_src/less')
-rw-r--r--web_src/less/_base.less5
-rw-r--r--web_src/less/_dashboard.less5
2 files changed, 7 insertions, 3 deletions
diff --git a/web_src/less/_base.less b/web_src/less/_base.less
index c66cabd8a1..2abebe5c7d 100644
--- a/web_src/less/_base.less
+++ b/web_src/less/_base.less
@@ -332,6 +332,11 @@ a.commit-statuses-trigger {
&:extend(.unselectable);
}
+.issue-title code {
+ padding: 2px 4px;
+ border-radius: 6px;
+ background-color: var(--color-markup-code-block);
+}
/* try to match button with no icons in height */
.icon-button {
padding-top: 7.42px !important;
diff --git a/web_src/less/_dashboard.less b/web_src/less/_dashboard.less
index 570d772729..e9a906cbed 100644
--- a/web_src/less/_dashboard.less
+++ b/web_src/less/_dashboard.less
@@ -141,10 +141,9 @@
}
code {
- padding: 1px;
- font-size: 85%;
- background-color: rgba(0, 0, 0, .04);
+ padding: 2px 4px;
border-radius: 3px;
+ background-color: var(--color-markup-code-block);
word-break: break-all;
}