summaryrefslogtreecommitdiffstats
path: root/public
diff options
context:
space:
mode:
authorManuel Kuhlmann <mkuhlmann@users.noreply.github.com>2017-01-05 03:04:41 +0100
committerLunny Xiao <xiaolunwen@gmail.com>2017-01-05 10:04:41 +0800
commiteb9ce39bb70f5f5d5f13d51acf46586c65df1a77 (patch)
tree50f830e205ad19864fc104a9139c43e654d5113e /public
parenta5e07da8bedf5da47a4fec3dda6eaf2e54d69921 (diff)
downloadgitea-eb9ce39bb70f5f5d5f13d51acf46586c65df1a77.tar.gz
gitea-eb9ce39bb70f5f5d5f13d51acf46586c65df1a77.zip
Fix unified diff view styling (#585)
Signed-off-by: Manuel Kuhlmann <manuel@mkuhlmann.org>
Diffstat (limited to 'public')
-rw-r--r--public/css/index.css38
-rw-r--r--public/less/_repository.less48
2 files changed, 53 insertions, 33 deletions
diff --git a/public/css/index.css b/public/css/index.css
index cbf0280fce..2d86e812e3 100644
--- a/public/css/index.css
+++ b/public/css/index.css
@@ -1992,29 +1992,37 @@ footer .ui.language .menu {
padding-top: 8px;
padding-bottom: 8px;
}
-.repository .diff-file-box .code-diff tbody tr.add-code td:nth-child(1),
-.repository .diff-file-box .code-diff tbody tr.add-code td:nth-child(2),
-.repository .diff-file-box .code-diff tbody tr.del-code td:nth-child(3),
-.repository .diff-file-box .code-diff tbody tr.del-code td:nth-child(4) {
- background-color: #fafafa;
+.repository .diff-file-box .code-diff tbody tr .removed-code {
+ background-color: #ff9999;
+}
+.repository .diff-file-box .code-diff tbody tr .added-code {
+ background-color: #99ff99;
}
-.repository .diff-file-box .code-diff tbody tr.del-code td:nth-child(1),
-.repository .diff-file-box .code-diff tbody tr.del-code td:nth-child(2),
-.repository .diff-file-box .code-diff tbody tr td.del-code {
+.repository .diff-file-box .code-diff-unified tbody tr.del-code td {
background-color: #ffe0e0 !important;
border-color: #f1c0c0 !important;
}
-.repository .diff-file-box .code-diff tbody tr.add-code td:nth-child(3),
-.repository .diff-file-box .code-diff tbody tr.add-code td:nth-child(4),
-.repository .diff-file-box .code-diff tbody tr td.add-code {
+.repository .diff-file-box .code-diff-unified tbody tr.add-code td {
background-color: #d6fcd6 !important;
border-color: #c1e9c1 !important;
}
-.repository .diff-file-box .code-diff tbody tr .removed-code {
- background-color: #ff9999;
+.repository .diff-file-box .code-diff-split tbody tr.add-code td:nth-child(1),
+.repository .diff-file-box .code-diff-split tbody tr.add-code td:nth-child(2),
+.repository .diff-file-box .code-diff-split tbody tr.del-code td:nth-child(3),
+.repository .diff-file-box .code-diff-split tbody tr.del-code td:nth-child(4) {
+ background-color: #fafafa;
}
-.repository .diff-file-box .code-diff tbody tr .added-code {
- background-color: #99ff99;
+.repository .diff-file-box .code-diff-split tbody tr.del-code td:nth-child(1),
+.repository .diff-file-box .code-diff-split tbody tr.del-code td:nth-child(2),
+.repository .diff-file-box .code-diff-split tbody tr td.del-code {
+ background-color: #ffe0e0 !important;
+ border-color: #f1c0c0 !important;
+}
+.repository .diff-file-box .code-diff-split tbody tr.add-code td:nth-child(3),
+.repository .diff-file-box .code-diff-split tbody tr.add-code td:nth-child(4),
+.repository .diff-file-box .code-diff-split tbody tr td.add-code {
+ background-color: #d6fcd6 !important;
+ border-color: #c1e9c1 !important;
}
.repository .diff-file-box.file-content img {
max-width: 100%;
diff --git a/public/less/_repository.less b/public/less/_repository.less
index 6a779a0867..0babcedf39 100644
--- a/public/less/_repository.less
+++ b/public/less/_repository.less
@@ -922,24 +922,6 @@
// }
// }
- // light gray for empty lines before / after commit
- &.add-code td:nth-child(1), &.add-code td:nth-child(2),
- &.del-code td:nth-child(3), &.del-code td:nth-child(4) {
- background-color: #fafafa;
- }
-
- &.del-code td:nth-child(1), &.del-code td:nth-child(2),
- td.del-code {
- background-color: #ffe0e0 !important;
- border-color: #f1c0c0 !important;
- }
-
- &.add-code td:nth-child(3), &.add-code td:nth-child(4),
- td.add-code{
- background-color: #d6fcd6 !important;
- border-color: #c1e9c1 !important;
- }
-
.removed-code {
background-color: #ff9999;
}
@@ -949,6 +931,36 @@
}
}
}
+ .code-diff-unified tbody tr {
+ &.del-code td {
+ background-color: #ffe0e0 !important;
+ border-color: #f1c0c0 !important;
+ }
+
+ &.add-code td {
+ background-color: #d6fcd6 !important;
+ border-color: #c1e9c1 !important;
+ }
+ }
+ .code-diff-split tbody tr {
+ // light gray for empty lines before / after commit
+ &.add-code td:nth-child(1), &.add-code td:nth-child(2),
+ &.del-code td:nth-child(3), &.del-code td:nth-child(4) {
+ background-color: #fafafa;
+ }
+
+ &.del-code td:nth-child(1), &.del-code td:nth-child(2),
+ td.del-code {
+ background-color: #ffe0e0 !important;
+ border-color: #f1c0c0 !important;
+ }
+
+ &.add-code td:nth-child(3), &.add-code td:nth-child(4),
+ td.add-code{
+ background-color: #d6fcd6 !important;
+ border-color: #c1e9c1 !important;
+ }
+ }
&.file-content {
img {
max-width: 100%;