diff --git a/src/content/mytinytodo.js b/src/content/mytinytodo.js
index a7cdc35..7b7952a 100644
--- a/src/content/mytinytodo.js
+++ b/src/content/mytinytodo.js
@@ -718,7 +718,7 @@ var mytinytodo = window.mytinytodo = _mtt = {
window.matchMedia('(prefers-color-scheme: dark)').addListener(function (e) {
document.documentElement.setAttribute('data-system-appearance', e.matches ? 'dark' : 'light');
});
- }
+ }
// Counter
if (this.options.newTaskCounter) {
diff --git a/src/content/theme/dark.css b/src/content/theme/dark.css
index 05c6e31..6ad528e 100644
--- a/src/content/theme/dark.css
+++ b/src/content/theme/dark.css
@@ -5,9 +5,8 @@
/* Dark mode */
-/* prefers-color-scheme media query value detected in js part */
-html[data-appearance=dark],
-html[data-appearance=system][data-system-appearance=dark] {
+/* prefers-color-scheme media query is used in html link tag */
+:root {
color-scheme: dark;
diff --git a/src/includes/theme.php b/src/includes/theme.php
index eb6c4db..ac21d24 100644
--- a/src/includes/theme.php
+++ b/src/includes/theme.php
@@ -12,7 +12,9 @@
-
+
+
+