about summary refs log tree commit diff stats
path: root/read.html
diff options
context:
space:
mode:
authorAndrew Dolgov <noreply@fakecake.org>2021-01-26 13:26:43 +0300
committerAndrew Dolgov <noreply@fakecake.org>2021-01-26 13:26:43 +0300
commitdb5cf9263dfacd6fd7f578b64de1d92088783e63 (patch)
treeb1f9a3ecb5c9374ea81a38af573628d769598d84 /read.html
parent90791fc4d4b703a4a040157348705dca16fc1409 (diff)
downloadthe-epube-db5cf9263dfacd6fd7f578b64de1d92088783e63.tar.gz
the-epube-db5cf9263dfacd6fd7f578b64de1d92088783e63.tar.xz
prevent white flashes in dark mode
Diffstat (limited to 'read.html')
-rw-r--r--read.html12
1 files changed, 11 insertions, 1 deletions
diff --git a/read.html b/read.html
index 48d5128..2781f04 100644
--- a/read.html
+++ b/read.html
@@ -12,6 +12,16 @@
 	<link id="favicon" rel="shortcut icon" type="image/png" href="img/favicon.png" />
 	<link type="text/css" rel="stylesheet" media="screen" href="dist/app.min.css" />
 
+	<style type="text/css">
+		@media (prefers-color-scheme: dark) {
+			body[data-is-loading="true"].epube-reader,
+			body[data-is-loading="true"].epube-reader .loading {
+				background: #222;
+				color : #d7cbc1;
+			}
+		}
+	</style>
+
 	<script type="text/javascript">
 		'use strict';
 
@@ -30,7 +40,7 @@
 		}
 	</script>
 </head>
-<body class="epube-reader">
+<body class="epube-reader" data-is-loading="true">
 
 <div class="modal fade" id="settings-modal" tabindex="-1" role="dialog">
   <div class="modal-dialog" role="document">