Skip to content

Commit d145955

Browse files
Cherrglunny
authored andcommitted
Dark theme markdown fixes (#7260)
* fix colors in dark theme - tables inside rendered markdown Signed-off-by: Michael Gnehr <[email protected]> * fix colors in dark theme - simpleMDE rendered preview Signed-off-by: Michael Gnehr <[email protected]> * Update public/less/themes/arc-green.less remove scroll bar color, to add this globally on additional PR Co-Authored-By: Lauris BH <[email protected]> Signed-off-by: Michael Gnehr <[email protected]> * add missing class name Signed-off-by: Michael Gnehr <[email protected]>
1 parent a25b3d4 commit d145955

File tree

3 files changed

+39
-4
lines changed

3 files changed

+39
-4
lines changed

public/css/theme-arc-green.css

+7-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,13 @@ footer{background:#2e323e;border-top:1px solid #313131}
9292
.markdown:not(code) h2{border-bottom:1px solid #304251}
9393
.hljs,.hljs-keyword,.hljs-selector-tag,.hljs-subst{color:#9daccc}
9494
.markdown:not(code) .highlight pre,.markdown:not(code) pre{background-color:#2a2e3a;border:1px solid #404552}
95-
.markdown:not(code) table tr:nth-child(2n){background-color:#474d61}
95+
.markdown:not(code) table tr:nth-child(2n){background-color:#2a2e39}
96+
.markdown:not(code) table tr:nth-child(2n-1){background-color:#383b44}
97+
.markdown:not(code) table thead tr:nth-child(2n-1){background-color:#464c5d!important}
98+
.markdown:not(code) table td,.markdown:not(code) table th{border-color:#4c505c!important}
99+
.repository.file.editor.edit,.repository.wiki.new .CodeMirror{border-right:1px solid rgba(187,187,187,.6);border-left:1px solid rgba(187,187,187,.6);border-bottom:1px solid rgba(187,187,187,.6)}
100+
.repository.file.editor.edit .editor-preview,.repository.file.editor.edit .editor-preview-side,.repository.wiki.new .CodeMirror .editor-preview,.repository.wiki.new .CodeMirror .editor-preview-side{background:#353945}
101+
.repository.file.editor.edit .editor-preview .markdown:not(code).ui.segment,.repository.file.editor.edit .editor-preview-side .markdown:not(code).ui.segment,.repository.wiki.new .CodeMirror .editor-preview .markdown:not(code).ui.segment,.repository.wiki.new .CodeMirror .editor-preview-side .markdown:not(code).ui.segment{border-width:0}
96102
.ui.dropdown .menu{background:#2c303a}
97103
.ui.dropdown .menu>.message:not(.ui){color:#636363}
98104
.ui.input{color:#dbdbdb}

public/js/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1144,7 +1144,7 @@ function initWikiForm() {
11441144
"text": plainText
11451145
},
11461146
function (data) {
1147-
preview.innerHTML = '<div class="markdown">' + data + '</div>';
1147+
preview.innerHTML = '<div class="markdown ui segment">' + data + '</div>';
11481148
emojify.run($('.editor-preview')[0]);
11491149
}
11501150
);
@@ -1224,7 +1224,7 @@ function setSimpleMDE($editArea) {
12241224
"text": plainText
12251225
},
12261226
function (data) {
1227-
preview.innerHTML = '<div class="markdown">' + data + '</div>';
1227+
preview.innerHTML = '<div class="markdown ui segment">' + data + '</div>';
12281228
emojify.run($('.editor-preview')[0]);
12291229
}
12301230
);

public/less/themes/arc-green.less

+30-1
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,36 @@ a.ui.basic.green.label:hover {
501501
}
502502

503503
.markdown:not(code) table tr:nth-child(2n) {
504-
background-color: #474d61;
504+
background-color: #2a2e39;
505+
}
506+
507+
.markdown:not(code) table tr:nth-child(2n-1) {
508+
background-color: #383b44;
509+
}
510+
511+
.markdown:not(code) table thead tr:nth-child(2n-1) {
512+
background-color: #464c5d !important;
513+
}
514+
515+
.markdown:not(code) table td,
516+
.markdown:not(code) table th {
517+
border-color: #4c505c !important;
518+
}
519+
520+
.repository.file.editor.edit,
521+
.repository.wiki.new .CodeMirror {
522+
border-right: 1px solid rgba(187,187,187, 0.6);
523+
border-left: 1px solid rgba(187,187,187, 0.6);
524+
border-bottom: 1px solid rgba(187,187,187, 0.6);
525+
526+
.editor-preview,
527+
.editor-preview-side {
528+
background: #353945;
529+
530+
.markdown:not(code).ui.segment {
531+
border-width: 0;
532+
}
533+
}
505534
}
506535

507536
.ui.dropdown .menu {

0 commit comments

Comments
 (0)