Temporary fix for iOS dark mode main
authorBenjamin Auder <benjamin.auder@somewhere>
Fri, 2 May 2025 17:01:45 +0000 (19:01 +0200)
committerBenjamin Auder <benjamin.auder@somewhere>
Fri, 2 May 2025 17:01:45 +0000 (19:01 +0200)
iOS_fix.css [new file with mode: 0644]
index.html

diff --git a/iOS_fix.css b/iOS_fix.css
new file mode 100644 (file)
index 0000000..1a5e812
--- /dev/null
@@ -0,0 +1,3 @@
+.in-shadow {
+  opacity: 0.5;
+}
index 72b9091..669b406 100644 (file)
@@ -8,6 +8,18 @@
           content="width=device-width, initial-scale=1"/>
     <link id="_common_css"
           rel="stylesheet" href="/common.css"/>
+    <script type="text/javascript">
+      if (/iPad|iPhone|iPod/.test(navigator.userAgent)) {
+        // Apple brightness in SVG workaround
+        // TODO: remove that.
+        let link = document.createElement("link");
+        link.href = "iOS_fix.css";
+        link.type = "text/css";
+        link.rel = "stylesheet";
+        link.media = "screen,print";
+        document.getElementsByTagName("head")[0].appendChild(link);
+      }
+    </script>
   </head>
 
   <body>