From 734755770cd462e47c07b2dd84887815e4fb1a96 Mon Sep 17 00:00:00 2001 From: marshall beckrich Date: Fri, 6 Sep 2024 00:04:51 -0600 Subject: [PATCH] Add better dark/light mode PDF features See: Issue #43 --- scss/components/_pdfs.scss | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 scss/components/_pdfs.scss diff --git a/scss/components/_pdfs.scss b/scss/components/_pdfs.scss new file mode 100644 index 0000000..8bac970 --- /dev/null +++ b/scss/components/_pdfs.scss @@ -0,0 +1,35 @@ +/** +* 1. User requested integration with Style Settings plugin to replicate Minimal +* and its treatment of PDFs. Credit/source of modified scss: +* https://github.com/kepano/obsidian-minimal/blob/0b98cc8ec4576e148057ce6c0ff751ab4df1ece4/src/scss/content/pdf.scss +*/ + +.theme-light, +.theme-dark { + &.ctp-seamless-pdf { + --pdf-shadow: none; + + .pdf-viewer .page { + border: 0; + } + } +} + +.theme-dark { + &.ctp-pdf-darken { + .pdf-viewer .canvasWrapper, + .pdf-thumbnail-view .thumbnailImage { + filter: invert(1) hue-rotate(180deg); + mix-blend-mode: screen; + } + } +} + +.theme-light { + &.ctp-pdf-blend { + .pdf-viewer .canvasWrapper, + .pdf-thumbnail-view .thumbnailImage { + mix-blend-mode: multiply; + } + } +}