From 26558e4c6c63d7012da9677c246edeed4683c7da Mon Sep 17 00:00:00 2001 From: Min-Soo Kim Date: Thu, 7 Jan 2021 11:44:59 +0900 Subject: [PATCH] =?UTF-8?q?Moono-lisa=20=EC=97=90=20=EB=8C=80=ED=95=9C=20?= =?UTF-8?q?=EB=8B=A4=ED=81=AC=EB=AA=A8=EB=93=9C=20=EC=A0=9C=EC=95=88.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../editor/skins/ckeditor/css/default.less | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/modules/editor/skins/ckeditor/css/default.less b/modules/editor/skins/ckeditor/css/default.less index 6bd53c534..bebfccf77 100644 --- a/modules/editor/skins/ckeditor/css/default.less +++ b/modules/editor/skins/ckeditor/css/default.less @@ -32,6 +32,27 @@ margin: 0 0 @content_paragraph_spacing 0; } +/* if editor_auto_dark_mode == 'Y' load darkmode style */ +.auto_dark(@cs, @adm) when (@adm = Y) and not (@cs = moono-dark) { + html { + body.cke_editable { + .light_dark(moono-dark); + } + } + .cke_reset { + span { + &.cke_top { + .light_dark_top(moono-dark); + } + } + } + .cke_button_icon, .cke_combo_button, .cke_button_arrow, .cke_button_label { + filter: invert(1); + } +} +.auto_dark(@cs, @adm) when not (@adm = Y) or (@cs = moono-dark) { +} + .light_dark(@cs) when (@cs = moono-dark) { background-color: #333; color: #fff; @@ -132,4 +153,8 @@ p.editor_autosaved_message.autosave_message { } } -} \ No newline at end of file +} + +@media (prefers-color-scheme: dark) { + .auto_dark(@colorset, @auto_dark_mode) +}