philips/supernote-obsidian-plugin

enhancement: invert images automatically based on light/dark mode

Closed this issue · 0 comments

It seems I can invert images automatically by doing this in CSS:

.theme-dark img[alt$="sop_invert_dark"] {
  filter: invert(1);
}

.theme-light img[alt$="sop_invert_light"] {
  filter: invert(1);
}

source

Then I can register this CSS via https://docs.obsidian.md/Reference/TypeScript+API/Plugin/registerMarkdownCodeBlockProcessor

I would also need to do this in my note view.

cc @scotte

https://github.com/philips/supernote-obsidian-plugin/assets/33544/a87060d4-6fc0-4705-9352-a76ff28ad72b