{"id":2907,"date":"2024-07-03T10:09:48","date_gmt":"2024-07-03T16:09:48","guid":{"rendered":"https:\/\/frontendmasters.com\/blog\/?p=2907"},"modified":"2024-11-13T17:54:49","modified_gmt":"2024-11-13T22:54:49","slug":"why-is-this-thing-in-dark-mode","status":"publish","type":"post","link":"https:\/\/frontendmasters.com\/blog\/why-is-this-thing-in-dark-mode\/","title":{"rendered":"Why is this thing in Dark Mode?"},"content":{"rendered":"\n<p>I was looking at an email in a web app the other day, and it was showing it to me in &#8220;Dark Mode&#8221;. The email itself (of my own creation) purposely doesn&#8217;t bother to set a <code>background<\/code> or <code>color<\/code> for the most part, as then the defaults kick in which help naturally support both dark and light modes. So I was pleased! It worked!<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1019\" height=\"1024\" src=\"https:\/\/i0.wp.com\/frontendmasters.com\/blog\/wp-content\/uploads\/2024\/07\/dark-email.png?resize=1019%2C1024&#038;ssl=1\" alt=\"\" class=\"wp-image-4414\" srcset=\"https:\/\/i0.wp.com\/frontendmasters.com\/blog\/wp-content\/uploads\/2024\/07\/dark-email.png?w=1019&amp;ssl=1 1019w, https:\/\/i0.wp.com\/frontendmasters.com\/blog\/wp-content\/uploads\/2024\/07\/dark-email.png?resize=300%2C300&amp;ssl=1 300w, https:\/\/i0.wp.com\/frontendmasters.com\/blog\/wp-content\/uploads\/2024\/07\/dark-email.png?resize=150%2C150&amp;ssl=1 150w, https:\/\/i0.wp.com\/frontendmasters.com\/blog\/wp-content\/uploads\/2024\/07\/dark-email.png?resize=768%2C772&amp;ssl=1 768w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><figcaption class=\"wp-element-caption\">Email in &#8220;Dark Mode&#8221; in Front<\/figcaption><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1016\" height=\"1024\" src=\"https:\/\/i0.wp.com\/frontendmasters.com\/blog\/wp-content\/uploads\/2024\/07\/light-email.png?resize=1016%2C1024&#038;ssl=1\" alt=\"\" class=\"wp-image-4416\" srcset=\"https:\/\/i0.wp.com\/frontendmasters.com\/blog\/wp-content\/uploads\/2024\/07\/light-email.png?w=1016&amp;ssl=1 1016w, https:\/\/i0.wp.com\/frontendmasters.com\/blog\/wp-content\/uploads\/2024\/07\/light-email.png?resize=298%2C300&amp;ssl=1 298w, https:\/\/i0.wp.com\/frontendmasters.com\/blog\/wp-content\/uploads\/2024\/07\/light-email.png?resize=150%2C150&amp;ssl=1 150w, https:\/\/i0.wp.com\/frontendmasters.com\/blog\/wp-content\/uploads\/2024\/07\/light-email.png?resize=768%2C774&amp;ssl=1 768w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><figcaption class=\"wp-element-caption\">Email in &#8220;Light Mode&#8221; in Front<\/figcaption><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p>But then I was like&#8230; <em>why<\/em> am I looking at this email in Dark Mode? While I was working on the email, it was in Light Mode. I made it using <a href=\"https:\/\/mjml.io\/\">MJML<\/a> and the VS Code Extension which gave me a preview of the email, it was was in Light Mode there, so it looked surprising to me in Dark Mode that first time.<\/p>\n\n\n\n<p>First I checked my System Settings on macOS to see what was going on there:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"765\" src=\"https:\/\/i0.wp.com\/frontendmasters.com\/blog\/wp-content\/uploads\/2024\/07\/CleanShot-2024-07-03-at-10.45.32%402x.png?resize=1024%2C765&#038;ssl=1\" alt=\"\" class=\"wp-image-2911\" srcset=\"https:\/\/i0.wp.com\/frontendmasters.com\/blog\/wp-content\/uploads\/2024\/07\/CleanShot-2024-07-03-at-10.45.32%402x.png?resize=1024%2C765&amp;ssl=1 1024w, https:\/\/i0.wp.com\/frontendmasters.com\/blog\/wp-content\/uploads\/2024\/07\/CleanShot-2024-07-03-at-10.45.32%402x.png?resize=300%2C224&amp;ssl=1 300w, https:\/\/i0.wp.com\/frontendmasters.com\/blog\/wp-content\/uploads\/2024\/07\/CleanShot-2024-07-03-at-10.45.32%402x.png?resize=768%2C574&amp;ssl=1 768w, https:\/\/i0.wp.com\/frontendmasters.com\/blog\/wp-content\/uploads\/2024\/07\/CleanShot-2024-07-03-at-10.45.32%402x.png?resize=1536%2C1147&amp;ssl=1 1536w, https:\/\/i0.wp.com\/frontendmasters.com\/blog\/wp-content\/uploads\/2024\/07\/CleanShot-2024-07-03-at-10.45.32%402x.png?w=1620&amp;ssl=1 1620w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n\n<p>Light Mode there, so it wasn&#8217;t my system that was forcing Dark Mode. <\/p>\n\n\n\n<p>Then I checked my browser. I happened to be using Arc, which has Themes. <\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"731\" height=\"1024\" src=\"https:\/\/i0.wp.com\/frontendmasters.com\/blog\/wp-content\/uploads\/2024\/07\/CleanShot-2024-07-03-at-10.48.29%402x.png?resize=731%2C1024&#038;ssl=1\" alt=\"\" class=\"wp-image-2912\" style=\"width:321px;height:auto\" srcset=\"https:\/\/i0.wp.com\/frontendmasters.com\/blog\/wp-content\/uploads\/2024\/07\/CleanShot-2024-07-03-at-10.48.29%402x.png?resize=731%2C1024&amp;ssl=1 731w, https:\/\/i0.wp.com\/frontendmasters.com\/blog\/wp-content\/uploads\/2024\/07\/CleanShot-2024-07-03-at-10.48.29%402x.png?resize=214%2C300&amp;ssl=1 214w, https:\/\/i0.wp.com\/frontendmasters.com\/blog\/wp-content\/uploads\/2024\/07\/CleanShot-2024-07-03-at-10.48.29%402x.png?w=762&amp;ssl=1 762w\" sizes=\"auto, (max-width: 731px) 100vw, 731px\" \/><figcaption class=\"wp-element-caption\">That selected option on the left is &#8220;Automatic Appearance&#8221; which is what some things call &#8220;System&#8221; meaning match what the OS is doing.<\/figcaption><\/figure>\n<\/div>\n\n\n<p>Since that was set to &#8220;Automatic Appearance&#8221; it was following the OS&#8217; Light Mode so that wasn&#8217;t doing it (probably). There is also Command Bar shortcuts in Arc. Try typing &#8220;Switch&#8221; in there to see actions to change it:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"954\" height=\"446\" src=\"https:\/\/i0.wp.com\/frontendmasters.com\/blog\/wp-content\/uploads\/2024\/07\/Screenshot-2024-07-03-at-10.52.44%E2%80%AFAM.png?resize=954%2C446&#038;ssl=1\" alt=\"\" class=\"wp-image-2913\" style=\"width:418px;height:auto\" srcset=\"https:\/\/i0.wp.com\/frontendmasters.com\/blog\/wp-content\/uploads\/2024\/07\/Screenshot-2024-07-03-at-10.52.44%E2%80%AFAM.png?w=954&amp;ssl=1 954w, https:\/\/i0.wp.com\/frontendmasters.com\/blog\/wp-content\/uploads\/2024\/07\/Screenshot-2024-07-03-at-10.52.44%E2%80%AFAM.png?resize=300%2C140&amp;ssl=1 300w, https:\/\/i0.wp.com\/frontendmasters.com\/blog\/wp-content\/uploads\/2024\/07\/Screenshot-2024-07-03-at-10.52.44%E2%80%AFAM.png?resize=768%2C359&amp;ssl=1 768w\" sizes=\"auto, (max-width: 954px) 100vw, 954px\" \/><\/figure>\n<\/div>\n\n\n<p>Other browsers do it differently, but can do it. For example you can &#8220;Customize Chrome&#8221; from a button on the Start Page in which you can force a theme or set to &#8220;Device&#8221;. <\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"780\" height=\"870\" src=\"https:\/\/i0.wp.com\/frontendmasters.com\/blog\/wp-content\/uploads\/2024\/07\/CleanShot-2024-07-03-at-10.51.22%402x.png?resize=780%2C870&#038;ssl=1\" alt=\"\" class=\"wp-image-2914\" style=\"width:379px;height:auto\" srcset=\"https:\/\/i0.wp.com\/frontendmasters.com\/blog\/wp-content\/uploads\/2024\/07\/CleanShot-2024-07-03-at-10.51.22%402x.png?w=780&amp;ssl=1 780w, https:\/\/i0.wp.com\/frontendmasters.com\/blog\/wp-content\/uploads\/2024\/07\/CleanShot-2024-07-03-at-10.51.22%402x.png?resize=269%2C300&amp;ssl=1 269w, https:\/\/i0.wp.com\/frontendmasters.com\/blog\/wp-content\/uploads\/2024\/07\/CleanShot-2024-07-03-at-10.51.22%402x.png?resize=768%2C857&amp;ssl=1 768w\" sizes=\"auto, (max-width: 780px) 100vw, 780px\" \/><\/figure>\n<\/div>\n\n\n<p>But this wasn&#8217;t explaining it for me either, as I was Light Mode through both of those layers. <\/p>\n\n\n\n<p>What it turned out to be was a website-level setting. I was using the email app <a href=\"https:\/\/front.com\/\">Front<\/a>. Front has it&#8217;s own settings for themes, and in there indeed it was forcing a Dark Mode. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"571\" src=\"https:\/\/i0.wp.com\/frontendmasters.com\/blog\/wp-content\/uploads\/2024\/07\/CleanShot-2024-07-03-at-10.54.51%402x.png?resize=1024%2C571&#038;ssl=1\" alt=\"\" class=\"wp-image-2915\" srcset=\"https:\/\/i0.wp.com\/frontendmasters.com\/blog\/wp-content\/uploads\/2024\/07\/CleanShot-2024-07-03-at-10.54.51%402x.png?resize=1024%2C571&amp;ssl=1 1024w, https:\/\/i0.wp.com\/frontendmasters.com\/blog\/wp-content\/uploads\/2024\/07\/CleanShot-2024-07-03-at-10.54.51%402x.png?resize=300%2C167&amp;ssl=1 300w, https:\/\/i0.wp.com\/frontendmasters.com\/blog\/wp-content\/uploads\/2024\/07\/CleanShot-2024-07-03-at-10.54.51%402x.png?resize=768%2C429&amp;ssl=1 768w, https:\/\/i0.wp.com\/frontendmasters.com\/blog\/wp-content\/uploads\/2024\/07\/CleanShot-2024-07-03-at-10.54.51%402x.png?resize=1536%2C857&amp;ssl=1 1536w, https:\/\/i0.wp.com\/frontendmasters.com\/blog\/wp-content\/uploads\/2024\/07\/CleanShot-2024-07-03-at-10.54.51%402x.png?resize=2048%2C1143&amp;ssl=1 2048w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n\n<p>Changing that would change the colors of my email, which is exactly what I was trying to figure out. <\/p>\n\n\n\n<p>So in terms of <em>power<\/em>, It&#8217;s like:<\/p>\n\n\n\n<ol class=\"wp-block-list ticss-39877ea7\">\n<li class=\"ticss-8044c7f2 has-large-font-size\">Website setting<\/li>\n\n\n\n<li class=\"has-medium-font-size\">Browser setting<\/li>\n\n\n\n<li class=\"has-small-font-size\">OS\/Device setting<\/li>\n<\/ol>\n\n\n\n<p>And those top two typically have an option to allow the setting to fall through to the next level. <\/p>\n\n\n\n<p>That&#8217;s a lot of stuff to check when you&#8217;re trying to figure out what is controlling a color theme! I&#8217;m tempted to say <em>too many<\/em>, but when it comes to user control over websites, I tend to be in the camp of giving as much control to the user as possible. That leaves me extra conflicted about <a href=\"https:\/\/www.bram.us\/2024\/04\/13\/what-if-you-had-real-control-over-light-mode-dark-mode-on-a-per-site-basis\/\"><em>adding<\/em> browser level color mode switches<\/a> on a per-side basis, as it will likely lead to a 4-level system of diagnosing what mode is active. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>The website has the most control, since that&#8217;s what applies the CSS. But browsers also have a Dark\/Light\/System setting, and that can fall through to the OS\/Device.<\/p>\n","protected":false},"author":1,"featured_media":2921,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"sig_custom_text":"","sig_image_type":"featured-image","sig_custom_image":0,"sig_is_disabled":false,"inline_featured_image":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[81,7,157,195],"class_list":["post-2907","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog-post","tag-color","tag-css","tag-dark-theme","tag-email"],"acf":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/frontendmasters.com\/blog\/wp-content\/uploads\/2024\/07\/cHJpdmF0ZS9sci9pbWFnZXMvd2Vic2l0ZS8yMDIyLTA0L3Vwd2s2MTcxNjM1NC13aWtpbWVkaWEtaW1hZ2Uta293cXhreG4uanBn.webp?fit=1024%2C712&ssl=1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/posts\/2907","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/comments?post=2907"}],"version-history":[{"count":9,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/posts\/2907\/revisions"}],"predecessor-version":[{"id":4417,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/posts\/2907\/revisions\/4417"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/media\/2921"}],"wp:attachment":[{"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/media?parent=2907"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/categories?post=2907"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/tags?post=2907"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}