Skip to content

Commit

Permalink
don't invert images in dark mode
Browse files Browse the repository at this point in the history
  • Loading branch information
itsTheFae committed Oct 8, 2024
1 parent 68548cc commit 7d6cb77
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 0 additions & 2 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ <h3>{{ page.title }}</h3>
});

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);
Expand All @@ -98,7 +97,6 @@ <h3>{{ page.title }}</h3>

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) {
Expand Down
4 changes: 4 additions & 0 deletions _sass/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,10 @@ blockquote {
img {
max-width: 100%;
height: auto;

@media (prefers-color-scheme: dark) {
filter: invert(100%) hue-rotate(180deg);
}
}

.editor-link {
Expand Down

0 comments on commit 7d6cb77

Please sign in to comment.