[Rt-commit] rt branch, 5.0/fix-rich-text-styles-dark-theme, repushed

Blaine Motsinger blaine at bestpractical.com
Thu Jun 11 17:01:08 EDT 2020


The branch 5.0/fix-rich-text-styles-dark-theme was deleted and repushed:
       was cb10d4e1381bf065f8da5a916f5e92128a463ed5
       now 27249f93fa5b8b05c3e202efddcd2920cf58ba1e

1: 56b50fc059 ! 1: 0c97bfcd00 Add darkmode and Content classes to ckeditor
    @@ -19,16 +19,13 @@
     +// CSS targets can't traverse iframe boundaries so we need to do this to
     +// style the CKEditor iframe body content if the parent is in darkmode.
     +jQuery(function() {
    -+    if (document.body.classList.contains('darkmode')) {
    ++    if (document.body.classList.contains('darkmode') && RT.Config.MessageBoxRichText && document.querySelector('.messagebox')) {
     +        var messageBoxId = document.querySelector('.messagebox').getAttribute('id');
    -+        var richTextEditor = CKEDITOR.instances[messageBoxId];
     +
    -+        if (richTextEditor) {
    -+            richTextEditor.on('instanceReady', function() {
    -+                this.document.getBody().addClass('darkmode');
    -+                this.document.getBody().addClass(messageBoxId);
    -+            });
    -+        }
    ++        CKEDITOR.instances[messageBoxId].on('instanceReady', function() {
    ++            this.document.getBody().addClass('darkmode');
    ++            this.document.getBody().addClass(messageBoxId);
    ++        });
     +    }
     +});
     
3: cb10d4e138 ! 2: e736082d5a Fix text color for ckeditor in darkmode
    @@ -24,3 +24,4 @@
      blockquote
      {
      	font-style: italic;
    +
2: 85bad44d86 ! 3: b4670b4b57 Fix background colors for ckeditor darkmode
    @@ -1,9 +1,6 @@
     Author: Blaine Motsinger <blaine at bestpractical.com>
     
    -    Fix darkmode styles for ckeditor
    -    
    -    This commit contains general fixes to make the ckeditor styles
    -    match the darkmode theme for RT.
    +    Fix background colors for ckeditor darkmode
     
     diff --git a/share/static/css/elevator-dark/main.css b/share/static/css/elevator-dark/main.css
     --- a/share/static/css/elevator-dark/main.css
    @@ -15,9 +12,12 @@
     +
     +/* CKEditor darkmode fixes */
     +
    -+/* Reset all to a common color.
    -+   This is much easier than specifying each small button. */
    -+.darkmode [class^='cke_'] {
    ++.darkmode .cke_toolbar .cke_combo_button,
    ++.darkmode .cke_toolbox .cke_toolbar .cke_combo .cke_combo_text,
    ++.darkmode .cke_toolbox .cke_toolbar .cke_combo .cke_combo_open,
    ++.darkmode .cke_toolbox .cke_toolbar .cke_toolgroup,
    ++.darkmode .cke_toolbox .cke_toolbar .cke_toolgroup a,
    ++.darkmode #cke_Content .cke_contents .cke_wysiwyg_frame {
     +    background-color: #333d42 !important;
     +}
     +
    @@ -34,28 +34,4 @@
     +.darkmode #cke_Content .cke_bottom .cke_resizer {
     +    background-color: #2c3539 !important;
     +}
    -+
    -+.darkmode .cke_combo_arrow, .darkmode .cke_button_arrow {
    -+    border-top: 3px solid #aeb0b1 !important;
    -+}
    -+
    -+.darkmode .cke_toolbox .cke_toolbar .cke_combo .cke_combo_text {
    -+    color: #c9ccce !important;
    -+}
    -+
    -+.darkmode #cke_UpdateContent, .darkmode #cke_Content,
    -+.darkmode .cke_contents,
    -+.darkmode .cke_toolbar .cke_combo_button,
    -+.darkmode .cke_toolbar .cke_toolgroup {
    -+    border-color: #717171 !important;
    -+}
    -+
    -+/* invert color for toolbar pngs */
    -+.darkmode a.cke_button .cke_button_icon {
    -+    -webkit-filter: invert(100%) brightness(110%);
    -+    -moz-filter: invert(100%) brightness(110%);
    -+    -ms-filter: invert(100%) brightness(110%);
    -+    -o-filter: invert(100%) brightness(110%);
    -+    filter: invert(100%) brightness(110%);
    -+}
     
-:  ------- > 4: 1deff4bfb6 Fix borders for ckeditor darkmode
-:  ------- > 5: f150f467b9 Fix toolbar text color for ckeditor darkmode
-:  ------- > 6: 27249f93fa Fix toolbar icon color for ckeditor darkmode



More information about the rt-commit mailing list