1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-04-27 05:18:28 -04:00

IE11 compat fixes 🙄 (closes #94)

This commit is contained in:
Jake Jarvis 2020-04-26 09:48:12 -04:00
parent 736cc775e3
commit 3200509ffd
Signed by: jake
GPG Key ID: 2B0C9CF251E69A39
2 changed files with 3 additions and 2 deletions

View File

@ -37,8 +37,8 @@ if (!pref) {
// real-time switching if supported by OS/browser
// TODO: stop listening when the parent condition becomes false,
// right now these keep listening even if pref is set.
window.matchMedia('(prefers-color-scheme: dark)').addListener(e => e.matches && activateDarkMode());
window.matchMedia('(prefers-color-scheme: light)').addListener(e => e.matches && activateLightMode());
window.matchMedia('(prefers-color-scheme: dark)').addListener(function(e) { if (e.matches) activateDarkMode(); });
window.matchMedia('(prefers-color-scheme: light)').addListener(function(e) { if (e.matches) activateLightMode(); });
}
// handle lightbulb click

View File

@ -17,6 +17,7 @@ main {
margin: 0 auto;
padding-left: 1.5em;
padding-right: 1.5em;
display: block; // https://stackoverflow.com/questions/28794718/max-width-not-working-for-ie-11
@include themed() {
color: t(color-text);