Night Mode for PDF Viewer - Broken (1.8 Desktop)

With the release of update 1.8.3 on January 30th (1.8 Desktop), Night Mode for PDF Viewer has been broken. At the moment, i have css snippet that reads as follows:

.theme-dark .pdf-viewer {
filter: invert(0.85);
}

But, right now, it’s not working

I know about the “adapt to theme” feature, but it makes the characters in the text too bright for me because I much prefer the “old dark mode” from my CSS snippet.

2 Likes

I had a similar issue. I used to have my pdf perfectly adapted to my theme. Now the colors are just inverted. I’m sure this is an update problem as since yesterday everything worked fine

I agree, Its 100% problem of new update

What’s interesting, I’ve tried different ways to convert the pdf to dark mode, but a few other ways, still didn’t work

1 Like

hi, i ran into the same issue as you. To fix it you need to change your css-snippet to

.theme-dark .pdfViewer {
    filter: invert(0.85);
}
1 Like

Do you know how to fix the issues in the themes? Because I think it’s because they changed the name from pdf-viewer to pdfViewer. Probably the themes try to access the old name.

I don’t use a theme that changes the pdfViewer so i dont know for sure, but you could try to just replace pdf-viewer to pdfViewer in the theme.css file. It should be located at Obsidian Vault/.obsidian/themes.

Maybe they also changed more variables that breaks other stuff in your theme, so if that fails, I would advise you to contact the developer of your theme and ask them to update it.

2 Likes

It worked! So the problem was the css class! Thanks for the hint!


I changed my css snippet, but i have that. Before i only had a dark background

Can you give me your css snippet pls, because my css snippet doesnt work?