Skip to content
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

The background of a epub book on kindle is a grey color that makes it annoying to read the book #10263

Closed
thewhitetulip opened this issue Oct 6, 2024 · 8 comments

Comments

@thewhitetulip
Copy link
Contributor

thewhitetulip commented Oct 6, 2024

The problem is that for each paragraph page we are having a grayish background color that makes it really ugly to read books. I looked over the internet and certain people have found out a work around - to remove the background colour property. Hence I thought of raising this bug and doing a code fix myself. Even for my novel that I am generating via pandoc I have to give a custom css just for removing the background colour.

Pandoc version?

this applies to all pandoc version because the issue is in the style.css in the data folder.

@thewhitetulip
Copy link
Contributor Author

This is fixed in #10264

There are a bunch of other formatting issues, will submit a PR if you are open to accepting it.

@tarleb
Copy link
Collaborator

tarleb commented Oct 6, 2024

Could you say a bit more about the effect of this? A link to the resources you mentioned would be quite useful.

@thewhitetulip
Copy link
Contributor Author

image
If you look at this image, we get a grey box in the background due to the link that I removed.

@thewhitetulip
Copy link
Contributor Author

Will you be open to merging this? Also the default css stylesheet makes the epub book almost unreadable on Kindle. I use KOREADER. I was planning to edit the css file so that the default epub looks pretty

@jgm
Copy link
Owner

jgm commented Oct 7, 2024

I agree that this looks bad, and in view of that removing the default background color in the CSS seems a good idea. People can always add it if they want it. But we shouldn't have default CSS that looks bad on the most popular e-reader. (Note: my understanding is that the Kindle converts EPUBs to its own native format, and perhaps there is a problem in that conversion, but it really doesn't matter for our purposes if that's where the problem lies.)

@jgm jgm closed this as completed in de034b7 Oct 7, 2024
@thewhitetulip
Copy link
Contributor Author

Yep. What happens is the epub generated by pandoc is giving a really bad styling the to book. Amazon converts epub to azw3 format and the default css mattwrs quite a bit.

I have seen that for android or Linux ebook readers this doesn't matter because they outright ignore the css 😂

If you are willing to accept another PR. I would love to send one by doing some R&D on a decent default css that would be great to read on Kindle.

@tarleb
Copy link
Collaborator

tarleb commented Oct 8, 2024

PRs are always welcome, especially when accompanied by some docs and/or an explanation of why it is needed.

Thank you for your contribution!

@thewhitetulip
Copy link
Contributor Author

Nice! Let me find some time and I'll try to enhance the default formatting on Kindle.

Also foes without saying that this is the power of open source software!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants