1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-05-11 05:55:29 +00:00

Diff and code review refactors and improvements (#13922)

* Diff CSS refactors and misc tweaks

- Simplify Diff CSS styling
- Add color variables for diff
- Fix vertical centering of inline comment button
- Slightly adjust text colors, e.g. in comment header

* Code review improvments

* selector tweak

* fix diff issues, add inactive bg color

Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
silverwind
2020-12-17 16:52:58 +01:00
committed by GitHub
parent a8fa380c25
commit 8af9df0036
5 changed files with 124 additions and 278 deletions

View File

@@ -68,15 +68,23 @@
--color-black: #1e222e;
--color-gold: #a1882b;
--color-white: #ffffff;
--color-diff-removed-word-bg: #6f3333;
--color-diff-added-word-bg: #3c653c;
--color-diff-removed-row-bg: #3c2626;
--color-diff-added-row-bg: #283e2d;
--color-diff-removed-row-border: #634343;
--color-diff-added-row-border: #314a37;
--color-diff-inactive: #353846;
/* target-based colors */
--color-body: #383c4a;
--color-box-header: #454a57;
--color-box-body: #353945;
--color-box-header: #404652;
--color-box-body: #303440;
--color-text-dark: #dbe0ea;
--color-text: #bbc0ca;
--color-text-light: #a6aab5;
--color-text-light-2: #868a95;
--color-footer: #2e323e;
--color-timeline: #4a505c;
--color-timeline: #4c525e;
--color-input-text: #d5dbe6;
--color-input-background: #2e323e;
--color-input-border: #454a57;
@@ -318,10 +326,6 @@ a.ui.basic.green.label:hover {
background-color: #393d4a !important;
}
.ui .text.grey {
color: var(--color-secondary-dark-6) !important;
}
.repository.file.editor.edit,
.repository.wiki.new .CodeMirror {
.editor-preview,
@@ -360,32 +364,6 @@ a.ui.basic.green.label:hover {
color: #dbdbdb;
}
.repository.view.issue .comment-list .event > .svg.issue-symbol {
background: #3b4954;
}
.repository.view.issue .comment-list .event > .svg:not(.issue-symbol) {
text-shadow: -2px 0 #383c4a, 0 2px #383c4a, 2px 0 #383c4a, 0 -2px #383c4a;
}
.repository.view.issue .comment-list .comment .content .header {
color: #dbdbdb;
background-color: var(--color-secondary);
border-color: var(--color-secondary);
}
.repository.view.issue .comment-list .timeline-item .badge {
color: #ccc;
}
.comment-header-right a {
color: var(--color-secondary-dark-6);
}
.comment-header-right a:hover {
color: #dedede;
}
.repository .navbar .active.item,
.repository .navbar .active.item:hover {
border-color: transparent !important;
@@ -395,36 +373,10 @@ a.ui.basic.green.label:hover {
background-color: var(--color-secondary) !important;
}
.repository .diff-file-box .code-diff-unified tbody tr.del-code td {
background-color: #3c2626 !important;
border-color: #634343 !important;
}
.repository .diff-file-box .code-diff-unified tbody tr.del-code td.lines-num {
background-color: #4e2c2c !important;
}
.repository .diff-file-box .code-diff-unified tbody tr.add-code td {
background-color: #283e2d !important;
border-color: #314a37 !important;
}
.repository .diff-file-box .code-diff-unified tbody tr.add-code td.lines-num {
background-color: #2c4632 !important;
}
.repository .diff-stats li {
border-color: var(--color-secondary);
}
.removed-code {
background-color: #5f3737;
}
.added-code {
background-color: #3a523a;
}
.tag-code,
.tag-code td {
background: #353945 !important;
@@ -439,22 +391,6 @@ td.blob-hunk {
color: #dbdbdb !important;
}
.lines-type-marker {
background: #2a2e3a;
}
.code-diff-split .same-code .lines-type-marker {
background: #353945;
}
.ui .text.black {
color: var(--color-secondary-dark-6);
}
.ui .text.black:hover {
color: #dbdbdb;
}
.ui.attached.info.message,
.ui.info.message {
box-shadow: 0 0 0 1px #4b5e71 inset, 0 0 0 0 transparent;
@@ -666,36 +602,6 @@ a.blob-excerpt:hover {
}
}
.repository .label.list .item {
border-bottom: 1px dashed var(--color-secondary);
}
.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.add-code td:nth-child(3),
.repository .diff-file-box .code-diff-split tbody tr.del-code td:nth-child(4),
.repository .diff-file-box .code-diff-split tbody tr.del-code td:nth-child(5),
.repository .diff-file-box .code-diff-split tbody tr.del-code td:nth-child(6) {
background-color: #2a2e3a;
}
.repository .diff-file-box .code-diff-split tbody tr.add-code td:nth-child(4),
.repository .diff-file-box .code-diff-split tbody tr.add-code td:nth-child(5),
.repository .diff-file-box .code-diff-split tbody tr.add-code td:nth-child(6),
.repository .diff-file-box .code-diff-split tbody tr td.add-code,
.repository .diff-file-box .code-diff-split tbody tr td.lines-num-new.add-code {
background-color: #283e2d !important;
border-color: #314a37 !important;
}
.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.del-code td:nth-child(3),
.repository .diff-file-box .code-diff-split tbody tr td.del-code {
background-color: #3c2626 !important;
border-color: #634343 !important;
}
.ui.header .sub.header {
color: var(--color-secondary-dark-6);
}
@@ -764,46 +670,6 @@ a.blob-excerpt:hover {
}
}
.comment-code-cloud {
border-color: transparent;
.ui.attached.top.header {
background: none transparent;
border: 0;
}
.footer .markdown-info {
color: inherit;
}
}
.file-comment {
color: var(--color-secondary-dark-6);
}
.ui.comments .comment {
.author {
color: #dbdbdb;
}
.metadata {
color: #808084;
}
.text {
color: var(--color-secondary-dark-6);
}
}
.comment-header a {
color: var(--color-secondary-dark-6) !important;
}
.comment-header .actions a:hover,
.comment-header .actions a.active {
color: #dedede !important;
}
/* code mirror dark theme */
.CodeMirror {