stumpapp / stump

A free and open source comics, manga and digital book server with OPDS support (WIP)
https://stumpapp.dev
MIT License
851 stars 33 forks source link

[BUG] Black text on black background, epub on dark theme #243

Closed TheRouce closed 5 months ago

TheRouce commented 5 months ago

Describe the bug Black on black when viewing epub with dark theme on

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Settings'
  2. Click on 'Appearance'
  3. Change theme to 'Dark'
  4. View epub

Expected behavior

  1. white on black text when using a dark theme
  2. option to override reader appearance settings

Screenshots image image

I don't know how visible this will be but sometimes flipping between pages I see a blink of white text then it goes black. Not sure if this helps with fixing the bug: Peek 2024-01-18 13-16

Additional context I did a quick search of issues and didn't see a related one, let me know if this is related to another issue or report.

aaronleopold commented 5 months ago

Hey 👋

Thanks for reporting this! Are you able to test that this bug presents in other epub files? Or is it just this one? My immediate feeling is that there is some asset/style in the epub that is overriding Stump's, which would explain why you are seeing that flash, as well.

If it does wind up being isolated to that (or a select few) epub files, there are a few ways to continue debugging:

  1. If you're able to, send me the file and I can handle figure out where and why
  2. Inspect the iframe and send me the selector for any given text element and any style definitions/overrides shown
TheRouce commented 5 months ago

The two screenshots are from separate files, seems to only affect a couple.

Here's the second one: https://annas-archive.org/md5/274524bec378a5069f5e46ff2a146b55

Inspect the iframe and send me the selector for any given text element and any style definitions/overrides shown

Is this what you're asking for? ul.calibre26:nth-child(4) > li:nth-child(1) > span:nth-child(2), not super well versed in firefox's dev tools. This was the CSS Selector for white text on the same page: span.calibre6:nth-child(1)

Black text: image White text: image

aaronleopold commented 5 months ago

This is exactly what I needed, thank you! I was able to reproduce and correct the issue locally with the epub file you linked, I'll be sure to put up a PR this afternoon after work with those changes 👍

aaronleopold commented 5 months ago

The latest nightly has this fix, if you're able to try it out and let me know if it resolves the issue on your end

TheRouce commented 5 months ago

Works! image