From 7d6cb7762dddc58940d67c71c26d923f52c349c9 Mon Sep 17 00:00:00 2001 From: itsthefae Date: Tue, 8 Oct 2024 09:00:02 -0700 Subject: [PATCH] don't invert images in dark mode --- _layouts/default.html | 2 -- _sass/_layout.scss | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/_layouts/default.html b/_layouts/default.html index 8034a961b..bd27bdf0f 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -89,7 +89,6 @@

{{ page.title }}

}); function listenerByClass(className, eventName, funct) { - console.log("binding " + className + " with " + eventName) var elms = document.getElementsByClassName(className); for (var i=0; i < elms.length; i++) { elms[i].addEventListener(eventName, funct); @@ -98,7 +97,6 @@

{{ page.title }}

var DeetsOpen = false; listenerByClass("expand-all-details", "click", function () { - console.log('show-hide click'); var deets = document.getElementsByTagName("details"); for (var i=0; i < deets.length; i++) { if (DeetsOpen) { diff --git a/_sass/_layout.scss b/_sass/_layout.scss index b763c645e..97d397d5d 100644 --- a/_sass/_layout.scss +++ b/_sass/_layout.scss @@ -436,6 +436,10 @@ blockquote { img { max-width: 100%; height: auto; + + @media (prefers-color-scheme: dark) { + filter: invert(100%) hue-rotate(180deg); + } } .editor-link {