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,31 +40,33 @@
{% seo %}
</head>
<body>
<div class="container">
<div class="row clearfix header">
<h1 class="title"><a href="/blog/">{{ site.name }}</a></h1>
<a class="extra" href="/">home</a>
</div>
{{ content }}
<div class="row clearfix rss">
<a class="rss" href="/feed.xml"><img src="/img/rss.png" alt="RSS" class="icon" /></a>
</div>
<div class="row clearfix footer">
<div class="column full contact">
<p class="contact-info">
<a href="mailto:tyler@hallada.net">tyler@hallada.net</a>
</p>
<div class="root">
<div class="container">
<div class="row clearfix header">
<h1 class="title"><a href="/blog/">{{ site.name }}</a></h1>
<a class="extra" href="/">home</a>
</div>
{{ content }}
<div class="row clearfix rss">
<a class="rss" href="/feed.xml"><img src="/img/rss.png" alt="RSS" class="icon" /></a>
</div>
<div class="row clearfix footer">
<div class="column full contact">
<p class="contact-info">
<a href="mailto:tyler@hallada.net">tyler@hallada.net</a>
</p>
</div>
</div>
</div>
</div>
<div class="theme-toggle">
<dark-mode-toggle
id="dark-mode-toggle-1"
appearance="toggle"
light="Dark"
dark="Light"
permanent
></dark-mode-toggle>
<div class="theme-toggle">
<dark-mode-toggle
id="dark-mode-toggle-1"
appearance="toggle"
light="Dark"
dark="Light"
permanent
></dark-mode-toggle>
</div>
</div>
</body>
</html>

View File

@ -47,18 +47,20 @@
{% seo %}
</head>
<body>
<canvas id="magic"></canvas>
<div class="container">
{{ content }}
</div>
<div class="theme-toggle">
<dark-mode-toggle
id="dark-mode-toggle-1"
appearance="toggle"
light="Dark"
dark="Light"
permanent
></dark-mode-toggle>
<div class"root">
<canvas id="magic"></canvas>
<div class="container">
{{ content }}
</div>
<div class="theme-toggle">
<dark-mode-toggle
id="dark-mode-toggle-1"
appearance="toggle"
light="Dark"
dark="Light"
permanent
></dark-mode-toggle>
</div>
</div>
</body>
</html>

View File

@ -13,12 +13,21 @@
}
html {
width: 100%;
height: 100%;
background-color: whitesmoke;
margin: 0;
padding: 0;
}
body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
min-height: 100vh;
background-color: whitesmoke;
}
.root {
font-family: 'Open Sans', Arial, sans-serif;
font-style: normal;
font-weight: 400;
@ -71,6 +80,7 @@ a:hover {
}
canvas {
z-index: 2;
position: fixed;
top: 0;
left: 0;
@ -208,7 +218,8 @@ h1.title {
}
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;
}

View File

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