]> git.wh0rd.org - chrome-ext/web-power-switch.git/commitdiff
popup: add automatic dark-mode support
authorMike Frysinger <vapier@gentoo.org>
Sun, 5 Jan 2020 06:38:23 +0000 (12:23 +0545)
committerMike Frysinger <vapier@gentoo.org>
Sun, 5 Jan 2020 06:38:23 +0000 (12:23 +0545)
popup.html

index eb0dd4916969dcd2671d4cea1f3aab2bb3cbd729..37ea2a8f9af520789e770ccb017b1c18c2433af9 100644 (file)
@@ -13,7 +13,7 @@ table#buttons {
        border-collapse: collapse;
 }
 body {
-       margin: 0px;
+       margin: 1px;
        padding: 0px;
        font-family: Arial, sans-serif;
        font-size: smaller;
@@ -25,6 +25,12 @@ div#status {
        white-space: nowrap;
 }
 </style>
+<style media='(prefers-color-scheme: dark)'>
+html {
+       background-color: black;
+       filter: invert(1);
+}
+</style>
 </head>
 
 <body>