Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better dark mode icon color #39

Merged
merged 2 commits into from
Nov 2, 2023
Merged

Better dark mode icon color #39

merged 2 commits into from
Nov 2, 2023

Conversation

piroor
Copy link
Member

@piroor piroor commented Oct 19, 2023

Which issue(s) this PR fixes:

N/A

What this PR does / why we need it:

This applies more visible color for icons in the dark mode.

How to verify the fixed issue:

See icons with the dark mode of your platform.

The steps to verify:

  1. Change the color scheme of the platform to the dark mode.
  2. Open add-ons manager and look at the icon.
  3. Try to send a message with external domains.

Expected result:

Icons are rendered with visible color:
image
image

On the other hand, the latest release shows icons with hard-to-see color like:
image
image

@piroor piroor requested a review from ashie October 19, 2023 05:33
Copy link
Contributor

@kenhys kenhys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed.

LGTM.

tb-pr39-extlist

diff -u icon1.svg icon1.after.svg
--- icon1.svg   2023-10-19 18:34:56.323045094 +0900
+++ icon1.after.svg     2023-10-19 18:34:31.179027876 +0900
@@ -2,6 +2,19 @@
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
 <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
         y="0px" width="32px" height="32px" viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve">
+<style>
+  :root {
+    color-scheme: light dark;
+  }
+  path {
+    fill: #0C0C0D;
+  }
+  @media (prefers-color-scheme: dark) {
+    path {
+      fill: #F9F9FA;
+    }
+  }
+</style>
 <path d="M24.006,31.998c-0.266,0-0.52-0.105-0.707-0.293l-3-3c-0.384-0.397-0.373-1.03,0.024-1.414c0.388-0.374,1.002-0.374,1.39,0
        l2.157,2.157l6.315-9.023c0.321-0.449,0.945-0.554,1.395-0.233c0.444,0.316,0.553,0.93,0.244,1.38l-7,10
        c-0.168,0.243-0.436,0.399-0.731,0.427C24.064,32,24.035,32,24.006,31.998z"/>
 kenhys@jet  /legacy/thunderbird/flexconfirmmail/Thunderbird.work/webextensions/resources   master 4.1.7 ?  diff -u icon2.svg icon2.after.svg
--- icon2.svg   2023-10-19 18:34:56.323045094 +0900
+++ icon2.after.svg     2023-10-19 18:34:42.059035309 +0900
@@ -2,6 +2,19 @@
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
 <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
         y="0px" width="32px" height="32px" viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve">
+<style>
+  :root {
+    color-scheme: light dark;
+  }
+  path {
+    fill: #0C0C0D;
+  }
+  @media (prefers-color-scheme: dark) {
+    path {
+      fill: #F9F9FA;
+    }
+  }
+</style>
 <path d="M20.64,31.998c-0.376,0-0.737-0.15-1.004-0.417l-4.263-4.263c-0.545-0.565-0.531-1.465,0.034-2.01
        c0.551-0.532,1.424-0.532,1.975,0l3.065,3.065l8.975-12.823c0.457-0.638,1.343-0.786,1.981-0.331
        c0.631,0.45,0.785,1.321,0.348,1.961l-9.948,14.209c-0.237,0.346-0.619,0.568-1.039,0.607C20.725,32,20.682,32,20.64,31.998z"/>

@piroor piroor merged commit 9530ca7 into master Nov 2, 2023
1 check passed
@piroor
Copy link
Member Author

piroor commented Nov 2, 2023

Thanks!

@kenhys kenhys deleted the better-dark-mode-icon-color branch November 2, 2023 05:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants