Bug 1627748 - Message pane: when prefers-color-scheme: dark is set use the approriate colours. r=mkmelin ui-r=aleca
authorRichard Marti <richard.marti@gmail.com>
Mon, 13 Apr 2020 21:35:02 +0300
changeset 29266 8156ee771038ee9972d34c1c71f8437d59e372e4
parent 29265 ad558c51b1f0fcf7210f5c92e95822ec2ec77287
child 29267 20d8e89253294e6c229371fbdfd1105fb125e65c
push id17284
push usermkmelin@iki.fi
push dateMon, 13 Apr 2020 18:36:00 +0000
treeherdercomm-central@8156ee771038 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmkmelin, aleca
bugs1627748
Bug 1627748 - Message pane: when prefers-color-scheme: dark is set use the approriate colours. r=mkmelin ui-r=aleca
mail/base/content/composerOverlay.css
mail/themes/linux/jar.mn
mail/themes/linux/mail/messageQuotes.css
mail/themes/osx/jar.mn
mail/themes/osx/mail/messageQuotes.css
mail/themes/shared/jar.inc.mn
mail/themes/shared/mail/mailWindow1.css
mail/themes/shared/mail/messageQuotes.css
mail/themes/windows/jar.mn
mail/themes/windows/mail/messageQuotes.css
mailnews/mailnews.js
--- a/mail/base/content/composerOverlay.css
+++ b/mail/base/content/composerOverlay.css
@@ -18,23 +18,8 @@ blockquote[type=cite] table > tbody > tr
 table.moz-email-headers-table:hover,
 table.moz-email-headers-table:hover > tbody > tr > th,
 table.moz-email-headers-table:hover > tbody > tr > td,
 blockquote[type=cite] table:hover,
 blockquote[type=cite] table:hover > tbody > tr > th,
 blockquote[type=cite] table:hover > tbody > tr > td {
   border: 1px solid lightgrey !important;
 }
-
-/* Styles for the dark mode */
-@media (prefers-color-scheme: dark) {
-  html {
-    scrollbar-color: rgba(249, 249, 250, .4) rgba(20, 20, 25, .3);
-  }
-
-  body {
-    color: #f9f9fa;
-  }
-
-  span[_moz_quote="true"] {
-    color: #009fff;
-  }
-}
--- a/mail/themes/linux/jar.mn
+++ b/mail/themes/linux/jar.mn
@@ -24,17 +24,16 @@ classic.jar:
   skin/classic/messenger/compacttheme.css                     (mail/compacttheme.css)
   skin/classic/messenger/customizeToolbar.css                 (mail/customizeToolbar.css)
   skin/classic/messenger/section_collapsed.png                (mail/section_collapsed.png)
   skin/classic/messenger/section_expanded.png                 (mail/section_expanded.png)
   skin/classic/messenger/menulist.css                         (mail/menulist.css)
   skin/classic/messenger/messageBody.css                      (mail/messageBody.css)
   skin/classic/messenger/messageHeader.css                    (mail/messageHeader.css)
   skin/classic/messenger/messageIcons.css                     (mail/messageIcons.css)
-  skin/classic/messenger/messageQuotes.css                    (mail/messageQuotes.css)
   skin/classic/messenger/messenger.css                        (mail/messenger.css)
   skin/classic/messenger/attachmentList.css                   (mail/attachmentList.css)
   skin/classic/messenger/imageFilters.svg                     (mail/imageFilters.svg)
   skin/classic/messenger/mailWindow1.css                      (mail/mailWindow1.css)
   skin/classic/messenger/messageWindow.css                    (mail/messageWindow.css)
   skin/classic/messenger/searchBox.css                        (mail/searchBox.css)
   skin/classic/messenger/junkMail.css                         (mail/junkMail.css)
   skin/classic/messenger/input-fields.css                     (mail/input-fields.css)
--- a/mail/themes/osx/jar.mn
+++ b/mail/themes/osx/jar.mn
@@ -28,17 +28,16 @@ classic.jar:
   skin/classic/messenger/compacttheme.css                        (mail/compacttheme.css)
   skin/classic/messenger/customizeToolbar.css                    (mail/customizeToolbar.css)
   skin/classic/messenger/section_collapsed.png                   (mail/section_collapsed.png)
   skin/classic/messenger/section_expanded.png                    (mail/section_expanded.png)
   skin/classic/messenger/menulist.css                            (mail/menulist.css)
   skin/classic/messenger/messageBody.css                         (mail/messageBody.css)
   skin/classic/messenger/messageHeader.css                       (mail/messageHeader.css)
   skin/classic/messenger/messageIcons.css                        (mail/messageIcons.css)
-  skin/classic/messenger/messageQuotes.css                       (mail/messageQuotes.css)
   skin/classic/messenger/messageWindow.css                       (mail/messageWindow.css)
   skin/classic/messenger/attachmentList.css                      (mail/attachmentList.css)
   skin/classic/messenger/msgSelectOffline.css                    (mail/msgSelectOffline.css)
   skin/classic/messenger/mailWindow1.css                         (mail/mailWindow1.css)
   skin/classic/messenger/searchBox.css                           (mail/searchBox.css)
   skin/classic/messenger/junkMail.css                            (mail/junkMail.css)
   skin/classic/messenger/input-fields.css                        (mail/input-fields.css)
   skin/classic/messenger/folderMenus.css                         (mail/folderMenus.css)
deleted file mode 100644
--- a/mail/themes/osx/mail/messageQuotes.css
+++ /dev/null
@@ -1,46 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/* Because this sheet is loaded synchronously while the user is waiting for the
-   compose window to appear, it must not @import a ton of other things, and
-   especially must not trigger network access. */
-
-/* ===== messageQuotes.css =================================================
-  == Shared styles such as block quote colors and signature style
-  == between the message body during
-  == message display and the mail editor instance for mail compose.
-  ======================================================================= */
-
-/* workaround for MS Outlook mails where the line-height is set to 0 */
-body {
-  line-height: initial !important;
-}
-
-/* ::::: signature ::::: */
-
-@media not print {
-  div.moz-text-flowed > div.moz-txt-sig,
-  div.moz-text-plain > pre > div.moz-txt-sig,
-  pre.moz-signature {
-    opacity: 0.6;
-  }
-}
-
-/* Quote Levels Colors */
-
-body blockquote[type=cite] {
-  color: blue !important;
-  border-color: blue !important;
-  border-inline-start-width: 2px;
-}
-
-blockquote[type=cite] blockquote[type=cite] {
-  color: green !important;
-  border-color: green !important;
-}
-
-blockquote[type=cite] blockquote[type=cite] blockquote[type=cite] {
-  color: maroon !important;
-  border-color: maroon !important;
-}
--- a/mail/themes/shared/jar.inc.mn
+++ b/mail/themes/shared/jar.inc.mn
@@ -4,16 +4,17 @@
 
 # This is not a complete / proper jar manifest. It is included by the
 # actual theme-specific manifests, so that shared resources need only
 # be specified once. As a result, the source file paths are relative
 # to the location of the actual manifest.
 
   skin/classic/messenger/aboutNetError.css                    (../shared/mail/aboutNetError.css)
   skin/classic/messenger/aboutSupport.css                     (../shared/mail/aboutSupport.css)
+  skin/classic/messenger/messageQuotes.css                    (../shared/mail/messageQuotes.css)
   skin/classic/messenger/addressbook/icons/menu.svg           (../shared/mail/icons/menu.svg)
   skin/classic/messenger/downloads/download.svg               (../shared/mail/icons/download.svg)
   skin/classic/messenger/folderProps.css                      (../shared/mail/folderProps.css)
   skin/classic/messenger/icons/address.svg                    (../shared/mail/icons/address.svg)
   skin/classic/messenger/icons/addcontact.svg                 (../shared/mail/icons/addcontact.svg)
   skin/classic/messenger/icons/addlist.svg                    (../shared/mail/icons/addlist.svg)
   skin/classic/messenger/icons/accounts.svg                   (../shared/mail/icons/accounts.svg)
   skin/classic/messenger/icons/addon-install-blocked.svg      (../shared/mail/icons/addon-install-blocked.svg)
--- a/mail/themes/shared/mail/mailWindow1.css
+++ b/mail/themes/shared/mail/mailWindow1.css
@@ -125,8 +125,14 @@ treechildren::-moz-tree-image(correspond
 
 #messagepanebox {
   overflow: hidden;
 }
 
 #multimessage {
   background-color: -moz-Field;
 }
+
+@media (prefers-color-scheme: dark) {
+  #messagepanewrapper {
+    background-color: #2a2a2e;
+  }
+}
rename from mail/themes/linux/mail/messageQuotes.css
rename to mail/themes/shared/mail/messageQuotes.css
--- a/mail/themes/linux/mail/messageQuotes.css
+++ b/mail/themes/shared/mail/messageQuotes.css
@@ -23,39 +23,48 @@ body {
   div.moz-text-flowed > div.moz-txt-sig,
   div.moz-text-plain > pre > div.moz-txt-sig,
   pre.moz-signature {
     opacity: 0.6;
   }
 }
 
 /* ::::: Turn on borders and padding for quotes. ::::: */
-
-body blockquote[type=cite] {
-  padding: 0.4ex 1ex;
-  margin-block-start: 1ex;
-  margin-block-end: 1ex;
-  border-width: 0 2px;
-  border-style: none solid;
-}
-
 /* ::::: Colorize block quote borders. We only go 5 levels deep. ::::: */
 
 body blockquote[type=cite] {
-  border-color: rgb(114,159,207); /* Sky Blue 1 */
+  margin-block: 1ex;
+  padding: 0.4ex 1ex;
+  border-inline-start: 2px solid rgb(114, 159, 207); /* Sky Blue 1 */
 }
 
 blockquote[type=cite] blockquote[type=cite] {
-  border-color: rgb(173,127,168); /* Plum 1 */
+  border-inline-start-color: rgb(173, 127, 168); /* Plum 1 */
 }
 
 blockquote[type=cite] blockquote[type=cite] blockquote[type=cite] {
-  border-color: rgb(138,226,52); /* Chameleon 1 */
+  border-inline-start-color: rgb(138, 226, 52); /* Chameleon 1 */
 }
 
 blockquote[type=cite] blockquote[type=cite] blockquote[type=cite] blockquote[type=cite] {
-  border-color: rgb(252,175,62); /* Orange 1 */
+  border-inline-start-color: rgb(252, 175, 62); /* Orange 1 */
 }
 
 blockquote[type=cite] blockquote[type=cite] blockquote[type=cite] blockquote[type=cite] blockquote[type=cite] {
-  border-color: rgb(233,185,110); /* Chocolate 1 */
+  border-inline-start-color: rgb(233, 185, 110); /* Chocolate 1 */
 }
 
+/* Styles for the dark mode */
+@media (prefers-color-scheme: dark) {
+  html {
+    scrollbar-color: rgba(249, 249, 250, .4) rgba(20, 20, 25, .3);
+  }
+
+  body {
+    color: #f9f9fa;
+    background-color: #2a2a2e;
+  }
+
+  span[_moz_quote="true"] {
+    color: #009fff;
+  }
+}
+
--- a/mail/themes/windows/jar.mn
+++ b/mail/themes/windows/jar.mn
@@ -24,17 +24,16 @@ classic.jar:
   skin/classic/messenger/compacttheme.css                     (mail/compacttheme.css)
   skin/classic/messenger/customizeToolbar.css                 (mail/customizeToolbar.css)
   skin/classic/messenger/section_collapsed.png                (mail/section_collapsed.png)
   skin/classic/messenger/section_expanded.png                 (mail/section_expanded.png)
   skin/classic/messenger/menulist.css                         (mail/menulist.css)
   skin/classic/messenger/messageBody.css                      (mail/messageBody.css)
   skin/classic/messenger/messageHeader.css                    (mail/messageHeader.css)
   skin/classic/messenger/messageIcons.css                     (mail/messageIcons.css)
-  skin/classic/messenger/messageQuotes.css                    (mail/messageQuotes.css)
   skin/classic/messenger/messenger.css                        (mail/messenger.css)
   skin/classic/messenger/attachmentList.css                   (mail/attachmentList.css)
   skin/classic/messenger/imageFilters.svg                     (mail/imageFilters.svg)
   skin/classic/messenger/mailWindow1.css                      (mail/mailWindow1.css)
   skin/classic/messenger/messageWindow.css                    (mail/messageWindow.css)
   skin/classic/messenger/searchBox.css                        (mail/searchBox.css)
   skin/classic/messenger/junkMail.css                         (mail/junkMail.css)
   skin/classic/messenger/input-fields.css                     (mail/input-fields.css)
deleted file mode 100644
--- a/mail/themes/windows/mail/messageQuotes.css
+++ /dev/null
@@ -1,61 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/* Because this sheet is loaded synchronously while the user is waiting for the
-   compose window to appear, it must not @import a ton of other things, and
-   especially must not trigger network access. */
-
-/* ===== messageQuotes.css =================================================
-  == Shared styles such as block quote colors and signature style
-  == between the message body during
-  == message display and the mail editor instance for mail compose.
-  ======================================================================= */
-
-/* workaround for MS Outlook mails where the line-height is set to 0 */
-body {
-  line-height: initial !important;
-}
-
-/* ::::: signature ::::: */
-
-@media not print {
-  div.moz-text-flowed > div.moz-txt-sig,
-  div.moz-text-plain > pre > div.moz-txt-sig,
-  pre.moz-signature {
-    opacity: 0.6;
-  }
-}
-
-/* ::::: Turn on borders and padding for quotes. ::::: */
-
-body blockquote[type=cite] {
-  padding: 0.4ex 1ex;
-  margin-block-start: 1ex;
-  margin-block-end: 1ex;
-  border-width: 0 2px;
-  border-style: none solid;
-}
-
-/* ::::: Colorize block quote borders. We only go 5 levels deep. ::::: */
-
-body blockquote[type=cite] {
-  border-color: rgb(114,159,207); /* Sky Blue 1 */
-}
-
-blockquote[type=cite] blockquote[type=cite] {
-  border-color: rgb(173,127,168); /* Plum 1 */
-}
-
-blockquote[type=cite] blockquote[type=cite] blockquote[type=cite] {
-  border-color: rgb(138,226,52); /* Chameleon 1 */
-}
-
-blockquote[type=cite] blockquote[type=cite] blockquote[type=cite] blockquote[type=cite] {
-  border-color: rgb(252,175,62); /* Orange 1 */
-}
-
-blockquote[type=cite] blockquote[type=cite] blockquote[type=cite] blockquote[type=cite] blockquote[type=cite] {
-  border-color: rgb(233,185,110); /* Chocolate 1 */
-}
-
--- a/mailnews/mailnews.js
+++ b/mailnews/mailnews.js
@@ -147,17 +147,21 @@ pref("mail.imap.tcp_keepalive.retry_inte
 // is acting as a delegate for that folder, and wishes to use the other users
 // identity when acting on messages in other users folders.
 pref("mail.imap.delegateOtherUsersFolders", false);
 pref("mail.thread_without_re",              false); // if false, only thread by subject if Re:
 pref("mail.strict_threading",               true);  // if true, don't thread by subject at all
 pref("mail.correct_threading",              true);  // if true, makes sure threading works correctly always (see bug 181446)
 pref("mail.pop3.deleteFromServerOnMove",    false);
 pref("mail.fixed_width_messages",           true);
+#ifdef MOZ_SUITE
 pref("mail.citation_color",                 "#000000"); // quoted color
+#else
+pref("mail.citation_color",                 "#007cff"); // quoted color
+#endif
 pref("mail.strip_sig_on_reply", true); // If true, remove the everything after the "-- \n" signature delimiter when replying.
 pref("mail.quoted_style",                   0); // 0=plain, 1=bold, 2=italic, 3=bolditalic
 pref("mail.quoted_size",                    0); // 0=normal, 1=big, 2=small
 pref("mail.quoted_graphical",               true); // use HTML-style quoting for displaying plain text
 pref("mail.quoteasblock",                   true); // use HTML-style quoting for quoting plain text
 pref("mail.strictly_mime",                  false);
 pref("mail.strictly_mime_headers",          true);
 pref("mail.folder_widget.max_recent",       25); // The maximum number of entries in the "Recent" menu of the folder picker.