From e25e7b9598241947e83977b3ea6f8349cfdaa050 Mon Sep 17 00:00:00 2001 From: silverwind Date: Fri, 18 Dec 2020 21:00:07 +0100 Subject: [PATCH] Commit list display tweaks (#14043) - Make plain
 inherit our monospace fonts, overriding fomantic's
  css reset which means expanded commit messages now follow the font
  settings.
- Adjust link styling and keyword highlighting in commit message
- Consolidate .commit-summary styles to single selector group

Co-authored-by: Lunny Xiao 
Co-authored-by: techknowlogick 
---
 web_src/less/_base.less       |  1 +
 web_src/less/_repository.less | 49 ++++++++++-------------------------
 2 files changed, 14 insertions(+), 36 deletions(-)

diff --git a/web_src/less/_base.less b/web_src/less/_base.less
index 9a7aa28d4b..c07c76eb92 100644
--- a/web_src/less/_base.less
+++ b/web_src/less/_base.less
@@ -150,6 +150,7 @@ textarea {
   font-family: var(--fonts-regular);
 }
 
+pre,
 code,
 kbd,
 samp {
diff --git a/web_src/less/_repository.less b/web_src/less/_repository.less
index fe1c258810..0180a6ec1b 100644
--- a/web_src/less/_repository.less
+++ b/web_src/less/_repository.less
@@ -273,24 +273,6 @@
         .ui.avatar {
           margin-bottom: 5px;
         }
-
-        .commit-summary a {
-          text-decoration: underline;
-          text-decoration-style: dashed;
-
-          &:hover {
-            text-decoration-style: solid;
-          }
-
-          &.default-link {
-            text-decoration: none;
-
-            &:hover {
-              text-decoration: underline;
-              text-decoration-style: solid;
-            }
-          }
-        }
       }
 
       tbody {
@@ -2694,20 +2676,16 @@ tbody.commit-list {
   }
 }
 
-.commit-list .commit-summary a {
-  text-decoration: underline;
-  text-decoration-style: dashed;
-
+.commit-summary a {
   &:hover {
-    text-decoration-style: solid;
+    text-decoration: underline solid;
   }
 
   &.default-link {
     text-decoration: none;
 
     &:hover {
-      text-decoration: underline;
-      text-decoration-style: solid;
+      text-decoration: underline solid;
     }
   }
 }
@@ -2719,16 +2697,11 @@ tbody.commit-list {
 
 .commit-body {
   white-space: pre-wrap;
+  margin: 0;
 }
 
-.git-notes {
-  &.top {
-    text-align: left;
-  }
-
-  .commit-body {
-    margin: 0;
-  }
+.git-notes.top {
+  text-align: left;
 }
 
 @media @mediaSm {
@@ -2924,9 +2897,13 @@ td.blob-excerpt {
   background-color: #fafafa;
 }
 
-.issue-keyword {
-  border-bottom: 1px dotted #959da5;
-  display: inline-block;
+.issue-keyword,
+.commit-body .issue-keyword:hover {
+  border-bottom: 1px dotted var(--color-text-light-2);
+}
+
+.issue-keyword:hover {
+  border-bottom: none;
 }
 
 .file-header {