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) +}