-
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Style Settings options for Obisidian 1.3.0+'s PDF tools #43
Comments
Any updates? |
I'm working on this as part of the rewrite on the development branch. It's not in there yet, but I will update this issue once it makes it in. :) |
Hey, curious but is there any update on this? Edit: I just saw the project status issue. I hope you're doing well! Sorry I didn't check it sooner. I was unaware you might be dealing with health issues. Wishing you good health. |
Hey, I apologize for the slow movement on this. I didn’t fully realize there was an underlying usability issue! I’ll take a look tonight or tomorrow and make things better. Thanks for the heads up and reminder.On Sep 5, 2024, at 7:10 PM, nathanjodoin ***@***.***> wrote:
Hey, curious but is there any update on this?
PDF rendering in dark mode with this theme is not great, particularly when there are highlights in the text.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were assigned.Message ID: ***@***.***>
|
I have gone ahead and implemented PDF-related features in Style Settings using some trimmed scss from Kepano's Minimal Theme (https://github.com/kepano/obsidian-minimal/blob/0b98cc8ec4576e148057ce6c0ff751ab4df1ece4/src/scss/content/pdf.scss). Three new toggles, all of which should be off by default, have been added:
Two examples can be seen below. I have pushed these changes already, but still open to any feedback/suggestions on this topic and will leave the issue open for a bit. Thanks to everyone for their patience! |
Appreciate the update! I will download and test. |
This is a really big improvement, thank you for taking the time to look at it again. All screenshots below were taken with seamless mode on; the results are the same with seamless mode off. Light Mode (Blend OFF)Light Mode (Blend ON)Dark Mode (Darken PDF Background OFF)Dark Mode (Darken PDF Background ON) |
I'm happy to continue to help troubleshoot. If you still need a copy for testing, I can attach it here, it looks like the problem, in my case, might be a conflict with this existing feature. Also, I appreciate your work on this greatly. I have some familiarity with CSS myself, so if there's anything I can do to help directly, I'll try to take a look at the code. |
No problem! I am happy to work on this and appreciate your patience. It's just been a while since I have looked at all this, so I am refreshing my memory as we go. If you could attach a pdf, that would be great. If you want to look at the scss from Minimal, that's here: https://github.com/kepano/obsidian-minimal/blob/master/src/scss/content/pdf.scss If you don't have scss setup on your machine or haven't used it before, you can use something like this as a pure css snippet. The most relevant parts are at body {
--pdf-dark-opacity: 1;
}
.theme-light:not(.pdf-shadows-on),
.theme-dark:not(.pdf-shadows-on) {
--pdf-shadow: none;
--pdf-thumbnail-shadow: none;
.pdf-viewer .page {
border: 0;
}
.pdf-sidebar-container .thumbnailSelectionRing {
padding: 0;
}
.pdf-sidebar-container .thumbnail::after {
right: var(--size-4-2);
bottom: var(--size-4-2);
}
}
.theme-dark {
--pdf-thumbnail-shadow: 0 0 1px 0 rgba(0,0,0,0.6);
--pdf-shadow: 0 0 1px 0 rgba(0,0,0,0.6);
.pdf-viewer .canvasWrapper {
opacity: var(--pdf-dark-opacity);
}
.ctp-pdf-darken .workspace-leaf-content[data-type=pdf] {
.pdf-viewer .canvasWrapper {
filter: invert(1) hue-rotate(180deg);
mix-blend-mode: screen;
}
}
}
.theme-light {
.ctp-pdf-blend .workspace-leaf-content[data-type=pdf] {
.pdf-viewer .canvasWrapper {
mix-blend-mode: multiply;
}
}
} |
User request in Discord: https://discord.com/channels/907385605422448742/1027435548165558303/1111347548364492873
Relevant tag from Minimal theme: https://github.com/kepano/obsidian-minimal/releases/tag/6.3.3
The text was updated successfully, but these errors were encountered: