Code Monkey home page Code Monkey logo

Comments (7)

kurema avatar kurema commented on June 15, 2024

Thanks for you suggestion. It sounds to me nice idea to support dark theme for epub viewer.
But we have two problem.

  • UWP WebView which is based on edgeHTML doesn't seem to support prefers-color-scheme.
  • Bibi (the engine of epub reader) does not support dark theme yet (issue).

We plan to move to WinUI 3 / WebView2 (based on Chromium). It will fix the first problem. But it should take some time (maybe in 2022 / WinUI 3 roadmap).
About Bibi, it can be difficult. Epub files have its own css and they don't support dark theme in most cases. It is easy to add

@media (prefers-color-scheme: dark) { :root{filter: invert(100%) hue-rotate(180deg);}  }

somewhere but I think it causes numerous problems. Such as

  • It does not work correctly if css of the epub file already support dark theme.
  • Image can be strange.

In conclusion, we really think it's lovely idea but it should take a time to implement.

from bookviewerapp3.

kurema avatar kurema commented on June 15, 2024

I noticed some other small issue for the dark theme. They will be fixed in next release.
image
image

from bookviewerapp3.

FraH90 avatar FraH90 commented on June 15, 2024

Thanks for you suggestion. It sounds to me nice idea to support dark theme for epub viewer.
But we have two problem.

  • UWP WebView which is based on edgeHTML doesn't seem to support prefers-color-scheme.
  • Bibi (the engine of epub reader) does not support dark theme yet (issue).

We plan to move to WinUI 3 / WebView2 (based on Chromium). It will fix the first problem. But it should take some time (maybe in 2022 / WinUI 3 roadmap).
About Bibi, it can be difficult. Epub files have its own css and they don't support dark theme in most cases. It is easy to add

@media (prefers-color-scheme: dark) { :root{filter: invert(100%) hue-rotate(180deg);}  }

somewhere but I think it causes numerous problems. Such as

  • It does not work correctly if css of the epub file already support dark theme.
  • Image can be strange.

In conclusion, we really think it's lovely idea but it should take a time to implement.

I perfectly get it.. so it's just matter of time, that you move the platform to WebView2 and wait for bibi to implement the dark mode.

And what about the other functionality I mentioned? The possibility to highlights some passages in the epub books?

from bookviewerapp3.

kurema avatar kurema commented on June 15, 2024

Sorry, I forgot to mention that. About highlighting, I think it's also an issue of Bibi. I don't think I can do anything to implement (other than creating a pull request. which I won't).
There is an issue on Bibi, but it's unlikely.

from bookviewerapp3.

kurema avatar kurema commented on June 15, 2024

v3.2.2.0 have the experimental dark mode feature.
If you turn on the dark mode for Windows and the option below, you can use dark mode in Epub as default.
image
You can also manually turn on/off.

  1. Click here.
    image
  2. Here, here and here.
    image
  3. Result
    image

I just invoked a small script. This isn't the perfect solution, but it's here for now.

if(document.body.style.background===""){document.body.style.background='white';}
document.body.style.filter='invert(100%) hue-rotate(180deg)';

from bookviewerapp3.

kurema avatar kurema commented on June 15, 2024

If you really need the highlight feature, updated Epub.js Reader seems to have it. You can change the Epub engine in the setting.
image
image

from bookviewerapp3.

FraH90 avatar FraH90 commented on June 15, 2024

Thank you very much!
I'll try those features as soon as I'll install v3.2.2.0

from bookviewerapp3.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.