summaryrefslogtreecommitdiffstats
path: root/public/less/_repository.less
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2019-06-24 21:23:52 +0100
committerGitHub <noreply@github.com>2019-06-24 21:23:52 +0100
commit5908bb103003912bd0ba3cefa66f2ff815ee8d8e (patch)
treeec0f4ff99314aa4e38334b436e1aea287b27cb7b /public/less/_repository.less
parente07ff2f89064db8fa5c78a2a27a69d93183d10a4 (diff)
downloadgitea-5908bb103003912bd0ba3cefa66f2ff815ee8d8e.tar.gz
gitea-5908bb103003912bd0ba3cefa66f2ff815ee8d8e.zip
Make diff line-marker non-selectable (#7279)
* Make diff line-marker non-selectable * Move to use data-* as per @mrsdizzie * fix missing line nums * Add a minimum-width to force right-align of the line num * Move line-type-marker into separate column
Diffstat (limited to 'public/less/_repository.less')
-rw-r--r--public/less/_repository.less27
1 files changed, 24 insertions, 3 deletions
diff --git a/public/less/_repository.less b/public/less/_repository.less
index acf8d7b870..8d38faf50c 100644
--- a/public/less/_repository.less
+++ b/public/less/_repository.less
@@ -1339,6 +1339,7 @@
color: #a6a6a6;
background: #fafafa;
width: 1%;
+ min-width: 50px;
user-select: none;
vertical-align: top;
@@ -1403,6 +1404,22 @@
.added-code {
background-color: #99ff99;
}
+
+ .lines-num[data-line-num]::before {
+ content: attr(data-line-num);
+ text-align: right;
+ }
+
+ .lines-type-marker {
+ width: 10px;
+ min-width: 10px;
+ }
+
+ .line-type-marker[data-type-marker]::before {
+ content: attr(data-type-marker);
+ text-align: right;
+ display: inline-block;
+ }
}
}
}
@@ -1432,25 +1449,29 @@
&.add-code td:nth-child(1),
&.add-code td:nth-child(2),
&.del-code td:nth-child(3),
- &.del-code td:nth-child(4) {
+ &.del-code td:nth-child(4),
+ &.del-code td:nth-child(5),
+ &.del-code td:nth-child(6) {
background-color: #fafafa;
}
&.del-code td:nth-child(1),
&.del-code td:nth-child(2),
+ &.del-code td:nth-child(3),
td.del-code {
background-color: #ffe0e0 !important;
border-color: #f1c0c0 !important;
}
- &.add-code td:nth-child(3),
&.add-code td:nth-child(4),
+ &.add-code td:nth-child(5),
+ &.add-code td:nth-child(6),
td.add-code {
background-color: #d6fcd6 !important;
border-color: #c1e9c1 !important;
}
- td:nth-child(3) {
+ td:nth-child(4) {
border-left-width: 1px;
border-left-style: solid;
}