From 6a0b3a16c4e2fec3d412480660aea18e259399b6 Mon Sep 17 00:00:00 2001 From: Michael Gnehr Date: Thu, 20 Jun 2019 04:48:20 +0200 Subject: [PATCH 1/4] fix colors in dark theme - tables inside rendered markdown Signed-off-by: Michael Gnehr --- public/css/theme-arc-green.css | 5 ++++- public/less/themes/arc-green.less | 15 ++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/public/css/theme-arc-green.css b/public/css/theme-arc-green.css index dd2b13542a4de..8f4b603793200 100644 --- a/public/css/theme-arc-green.css +++ b/public/css/theme-arc-green.css @@ -92,7 +92,10 @@ footer{background:#2e323e;border-top:1px solid #313131} .markdown:not(code) h2{border-bottom:1px solid #304251} .hljs,.hljs-keyword,.hljs-selector-tag,.hljs-subst{color:#9daccc} .markdown:not(code) .highlight pre,.markdown:not(code) pre{background-color:#2a2e3a;border:1px solid #404552} -.markdown:not(code) table tr:nth-child(2n){background-color:#474d61} +.markdown:not(code) table tr:nth-child(2n){background-color:#2a2e39} +.markdown:not(code) table tr:nth-child(2n-1){background-color:#383b44} +.markdown:not(code) table thead tr:nth-child(2n-1){background-color:#464c5d!important} +.markdown:not(code) table td,.markdown:not(code) table th{border-color:#4c505c!important} .ui.dropdown .menu{background:#2c303a} .ui.dropdown .menu>.message:not(.ui){color:#636363} .ui.input{color:#dbdbdb} diff --git a/public/less/themes/arc-green.less b/public/less/themes/arc-green.less index 6d13bb2e5217e..75d56b1b5ecb2 100644 --- a/public/less/themes/arc-green.less +++ b/public/less/themes/arc-green.less @@ -501,7 +501,20 @@ a.ui.basic.green.label:hover { } .markdown:not(code) table tr:nth-child(2n) { - background-color: #474d61; + background-color: #2a2e39; +} + +.markdown:not(code) table tr:nth-child(2n-1) { + background-color: #383b44; +} + +.markdown:not(code) table thead tr:nth-child(2n-1) { + background-color: #464c5d !important; +} + +.markdown:not(code) table td, +.markdown:not(code) table th { + border-color: #4c505c !important; } .ui.dropdown .menu { From f9afaf705b38dd5671fa19abb4537d25a66f3324 Mon Sep 17 00:00:00 2001 From: Michael Gnehr Date: Thu, 20 Jun 2019 05:20:39 +0200 Subject: [PATCH 2/4] fix colors in dark theme - simpleMDE rendered preview Signed-off-by: Michael Gnehr --- public/css/theme-arc-green.css | 3 +++ public/js/index.js | 4 ++-- public/less/themes/arc-green.less | 16 ++++++++++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/public/css/theme-arc-green.css b/public/css/theme-arc-green.css index 8f4b603793200..f4231bb7b34b2 100644 --- a/public/css/theme-arc-green.css +++ b/public/css/theme-arc-green.css @@ -96,6 +96,9 @@ footer{background:#2e323e;border-top:1px solid #313131} .markdown:not(code) table tr:nth-child(2n-1){background-color:#383b44} .markdown:not(code) table thead tr:nth-child(2n-1){background-color:#464c5d!important} .markdown:not(code) table td,.markdown:not(code) table th{border-color:#4c505c!important} +.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)} +.repository.file.editor.edit .editor-preview,.repository.wiki.new .CodeMirror .editor-preview{background:#353945;scrollbar-color:#2a2a2a #fff} +.repository.file.editor.edit .editor-preview .markdown:not(code).ui.segment,.repository.wiki.new .CodeMirror .editor-preview .markdown:not(code).ui.segment{border-width:0} .ui.dropdown .menu{background:#2c303a} .ui.dropdown .menu>.message:not(.ui){color:#636363} .ui.input{color:#dbdbdb} diff --git a/public/js/index.js b/public/js/index.js index 28023e1061bbf..3b2527d986ed1 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -1144,7 +1144,7 @@ function initWikiForm() { "text": plainText }, function (data) { - preview.innerHTML = '
' + data + '
'; + preview.innerHTML = '
' + data + '
'; emojify.run($('.editor-preview')[0]); } ); @@ -1224,7 +1224,7 @@ function setSimpleMDE($editArea) { "text": plainText }, function (data) { - preview.innerHTML = '
' + data + '
'; + preview.innerHTML = '
' + data + '
'; emojify.run($('.editor-preview')[0]); } ); diff --git a/public/less/themes/arc-green.less b/public/less/themes/arc-green.less index 75d56b1b5ecb2..d84ddf9cc7782 100644 --- a/public/less/themes/arc-green.less +++ b/public/less/themes/arc-green.less @@ -517,6 +517,22 @@ a.ui.basic.green.label:hover { border-color: #4c505c !important; } +.repository.file.editor.edit, +.repository.wiki.new .CodeMirror { + border-right: 1px solid rgba(187,187,187, 0.6); + border-left: 1px solid rgba(187,187,187, 0.6); + border-bottom: 1px solid rgba(187,187,187, 0.6); + + .editor-preview { + background: #353945; + scrollbar-color: #2a2a2a white; + + .markdown:not(code).ui.segment { + border-width: 0; + } + } +} + .ui.dropdown .menu { background: #2c303a; } From 23049499b8477283ce1c10bb41944f4a7e49002f Mon Sep 17 00:00:00 2001 From: Cherrg Date: Thu, 20 Jun 2019 14:53:02 +0200 Subject: [PATCH 3/4] Update public/less/themes/arc-green.less remove scroll bar color, to add this globally on additional PR Co-Authored-By: Lauris BH Signed-off-by: Michael Gnehr --- public/css/theme-arc-green.css | 2 +- public/less/themes/arc-green.less | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/public/css/theme-arc-green.css b/public/css/theme-arc-green.css index f4231bb7b34b2..80dd76fb3840f 100644 --- a/public/css/theme-arc-green.css +++ b/public/css/theme-arc-green.css @@ -97,7 +97,7 @@ footer{background:#2e323e;border-top:1px solid #313131} .markdown:not(code) table thead tr:nth-child(2n-1){background-color:#464c5d!important} .markdown:not(code) table td,.markdown:not(code) table th{border-color:#4c505c!important} .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)} -.repository.file.editor.edit .editor-preview,.repository.wiki.new .CodeMirror .editor-preview{background:#353945;scrollbar-color:#2a2a2a #fff} +.repository.file.editor.edit .editor-preview,.repository.wiki.new .CodeMirror .editor-preview{background:#353945} .repository.file.editor.edit .editor-preview .markdown:not(code).ui.segment,.repository.wiki.new .CodeMirror .editor-preview .markdown:not(code).ui.segment{border-width:0} .ui.dropdown .menu{background:#2c303a} .ui.dropdown .menu>.message:not(.ui){color:#636363} diff --git a/public/less/themes/arc-green.less b/public/less/themes/arc-green.less index d84ddf9cc7782..6c1c408249f7e 100644 --- a/public/less/themes/arc-green.less +++ b/public/less/themes/arc-green.less @@ -525,7 +525,6 @@ a.ui.basic.green.label:hover { .editor-preview { background: #353945; - scrollbar-color: #2a2a2a white; .markdown:not(code).ui.segment { border-width: 0; From fdaeddb6b32e95af23590fe78b6a3abfa0f4ddeb Mon Sep 17 00:00:00 2001 From: Michael Gnehr Date: Thu, 20 Jun 2019 17:03:47 +0200 Subject: [PATCH 4/4] add missing class name Signed-off-by: Michael Gnehr --- public/css/theme-arc-green.css | 4 ++-- public/less/themes/arc-green.less | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/public/css/theme-arc-green.css b/public/css/theme-arc-green.css index 80dd76fb3840f..05cc6e5ebb1fd 100644 --- a/public/css/theme-arc-green.css +++ b/public/css/theme-arc-green.css @@ -97,8 +97,8 @@ footer{background:#2e323e;border-top:1px solid #313131} .markdown:not(code) table thead tr:nth-child(2n-1){background-color:#464c5d!important} .markdown:not(code) table td,.markdown:not(code) table th{border-color:#4c505c!important} .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)} -.repository.file.editor.edit .editor-preview,.repository.wiki.new .CodeMirror .editor-preview{background:#353945} -.repository.file.editor.edit .editor-preview .markdown:not(code).ui.segment,.repository.wiki.new .CodeMirror .editor-preview .markdown:not(code).ui.segment{border-width:0} +.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} +.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} .ui.dropdown .menu{background:#2c303a} .ui.dropdown .menu>.message:not(.ui){color:#636363} .ui.input{color:#dbdbdb} diff --git a/public/less/themes/arc-green.less b/public/less/themes/arc-green.less index 6c1c408249f7e..d2fe2982d797b 100644 --- a/public/less/themes/arc-green.less +++ b/public/less/themes/arc-green.less @@ -523,7 +523,8 @@ a.ui.basic.green.label:hover { border-left: 1px solid rgba(187,187,187, 0.6); border-bottom: 1px solid rgba(187,187,187, 0.6); - .editor-preview { + .editor-preview, + .editor-preview-side { background: #353945; .markdown:not(code).ui.segment {