Skip to content

Commit

Permalink
Add better dark/light mode PDF features
Browse files Browse the repository at this point in the history
See: Issue #43
  • Loading branch information
mbeckrich committed Sep 6, 2024
1 parent 5c2f30e commit 7347557
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions scss/components/_pdfs.scss
Original file line number Diff line number Diff line change
@@ -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;
}
}
}

0 comments on commit 7347557

Please sign in to comment.