Fix dark mode background across chrome and firefox

This commit is contained in:
Tyler Hallada 2021-08-01 01:03:13 -04:00
parent ee40b651a9
commit a617232868
4 changed files with 54 additions and 39 deletions

View File

@ -40,6 +40,7 @@
{% seo %} {% seo %}
</head> </head>
<body> <body>
<div class="root">
<div class="container"> <div class="container">
<div class="row clearfix header"> <div class="row clearfix header">
<h1 class="title"><a href="/blog/">{{ site.name }}</a></h1> <h1 class="title"><a href="/blog/">{{ site.name }}</a></h1>
@ -66,5 +67,6 @@
permanent permanent
></dark-mode-toggle> ></dark-mode-toggle>
</div> </div>
</div>
</body> </body>
</html> </html>

View File

@ -47,6 +47,7 @@
{% seo %} {% seo %}
</head> </head>
<body> <body>
<div class"root">
<canvas id="magic"></canvas> <canvas id="magic"></canvas>
<div class="container"> <div class="container">
{{ content }} {{ content }}
@ -60,5 +61,6 @@
permanent permanent
></dark-mode-toggle> ></dark-mode-toggle>
</div> </div>
</div>
</body> </body>
</html> </html>

View File

@ -13,12 +13,21 @@
} }
html { html {
width: 100%;
height: 100%;
background-color: whitesmoke; background-color: whitesmoke;
margin: 0;
padding: 0;
} }
body { body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
min-height: 100vh;
background-color: whitesmoke;
}
.root {
font-family: 'Open Sans', Arial, sans-serif; font-family: 'Open Sans', Arial, sans-serif;
font-style: normal; font-style: normal;
font-weight: 400; font-weight: 400;
@ -71,6 +80,7 @@ a:hover {
} }
canvas { canvas {
z-index: 2;
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
@ -208,7 +218,8 @@ h1.title {
} }
div.header { div.header {
margin: 20px 0 20px; /* this is padding instead of margin to prevent <html> from poking out behind top of page */
padding: 20px 0 20px;
text-align: center; text-align: center;
} }

View File

@ -1,6 +1,6 @@
/* Dark theme */ /* Dark theme */
html { body {
filter: invert(90%); filter: invert(90%);
} }