From d2cb9fef340579b9be9e29f671919e5b26f60cb6 Mon Sep 17 00:00:00 2001 From: "YUKI \"Piro\" Hiroshi" Date: Thu, 19 Oct 2023 13:37:54 +0900 Subject: [PATCH 1/2] Determine icon color with CSS prefers-color-scheme feature See also: piroor/treestyletab#3401 --- webextensions/resources/domain-checked.svg | 17 ++++++++++++++++- webextensions/resources/domain-unchecked.svg | 17 ++++++++++++++++- webextensions/resources/icon1.svg | 13 +++++++++++++ webextensions/resources/icon2.svg | 13 +++++++++++++ 4 files changed, 58 insertions(+), 2 deletions(-) diff --git a/webextensions/resources/domain-checked.svg b/webextensions/resources/domain-checked.svg index 72648d0..4fa021f 100644 --- a/webextensions/resources/domain-checked.svg +++ b/webextensions/resources/domain-checked.svg @@ -1,4 +1,19 @@ - \ No newline at end of file + + + + \ No newline at end of file diff --git a/webextensions/resources/domain-unchecked.svg b/webextensions/resources/domain-unchecked.svg index 61befdd..3aa3655 100644 --- a/webextensions/resources/domain-unchecked.svg +++ b/webextensions/resources/domain-unchecked.svg @@ -1,4 +1,19 @@ - \ No newline at end of file + + + + \ No newline at end of file diff --git a/webextensions/resources/icon1.svg b/webextensions/resources/icon1.svg index aedb6a7..8678917 100644 --- a/webextensions/resources/icon1.svg +++ b/webextensions/resources/icon1.svg @@ -2,6 +2,19 @@ + diff --git a/webextensions/resources/icon2.svg b/webextensions/resources/icon2.svg index 5fd3e2b..032c1a8 100644 --- a/webextensions/resources/icon2.svg +++ b/webextensions/resources/icon2.svg @@ -2,6 +2,19 @@ + From 0e9ae3b18db565c89cba046700878a878f27c0bd Mon Sep 17 00:00:00 2001 From: "YUKI \"Piro\" Hiroshi" Date: Thu, 19 Oct 2023 13:46:20 +0900 Subject: [PATCH 2/2] Define dark mode firendly icon color for unchecked domains --- webextensions/dialog/confirm/confirm.css | 5 +++++ webextensions/resources/domain-checked.svg | 17 +---------------- webextensions/resources/domain-unchecked.svg | 17 +---------------- 3 files changed, 7 insertions(+), 32 deletions(-) diff --git a/webextensions/dialog/confirm/confirm.css b/webextensions/dialog/confirm/confirm.css index 6ba9440..85374b9 100644 --- a/webextensions/dialog/confirm/confirm.css +++ b/webextensions/dialog/confirm/confirm.css @@ -142,6 +142,11 @@ hr.splitter { mask: url("/resources/domain-unchecked.svg") no-repeat center / 100%; width: 1em; } +@media (prefers-color-scheme: dark) { + .listbox .row.domain::before { + background: var(--grey-10); + } +} .listbox .row.domain.checked::before { background-color: var(--orange-50); diff --git a/webextensions/resources/domain-checked.svg b/webextensions/resources/domain-checked.svg index 4fa021f..72648d0 100644 --- a/webextensions/resources/domain-checked.svg +++ b/webextensions/resources/domain-checked.svg @@ -1,19 +1,4 @@ - - - - \ No newline at end of file + \ No newline at end of file diff --git a/webextensions/resources/domain-unchecked.svg b/webextensions/resources/domain-unchecked.svg index 3aa3655..61befdd 100644 --- a/webextensions/resources/domain-unchecked.svg +++ b/webextensions/resources/domain-unchecked.svg @@ -1,19 +1,4 @@ - - - - \ No newline at end of file + \ No newline at end of file