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

Ebook CSS is not respected #3467

Open
Redst0neFlux opened this issue Dec 20, 2024 · 3 comments · May be fixed by #3468
Open

Ebook CSS is not respected #3467

Redst0neFlux opened this issue Dec 20, 2024 · 3 comments · May be fixed by #3468
Labels
needs-triage Needs to be triaged by a developer and assigned a release

Comments

@Redst0neFlux
Copy link

What happened?

When I open an ebook that has css defined in it (eg colored text and text backgrounds), Kavita overwrites this to fit the color theme.

What did you expect?

I would like to either have a fifth theme that has fewer defaults (like the white theme with the following removed)

.book-content *:not(input), .book-content *:not(select), .book-content *:not(code), .book-content *:not(:link), .book-content *:not(.ngx-toastr) {
  color: black !important;
}

.book-content code {
  color: #e83e8c !important;
}

.book-content :link, .book-content a {
  color: #8db2e5 !important;
}

.book-content img, .book-content img[src] {
z-index: 1;
filter: brightness(0.85) !important;
background-color: initial !important;
}


.book-content *:not(code), .book-content *:not(a) {
    background-color: white;
    box-shadow: none;
    text-shadow: none;
    border-radius: unset;
    color: #dcdcdc !important;
}

It would also be great to be able to define custom reader themes, like we can customise the home page.

Kavita Version Number - If you don not see your version number listed, please update Kavita and see if your issue still persists.

0.8.4.2 - Stable

What operating system is Kavita being hosted from?

Docker (Dockerhub Container)

If the issue is being seen on Desktop, what OS are you running where you see the issue?

Linux

If the issue is being seen in the UI, what browsers are you seeing the problem on?

Firefox

If the issue is being seen on Mobile, what OS are you running where you see the issue?

None

If the issue is being seen on the Mobile UI, what browsers are you seeing the problem on?

No response

Relevant log output

No response

Additional Notes

Running on a Raspberry Pi, through Nginx

@Redst0neFlux Redst0neFlux added the needs-triage Needs to be triaged by a developer and assigned a release label Dec 20, 2024
@Redst0neFlux
Copy link
Author

I found a temporary solution by going through each book and adding !important to all css rules, but I would prefer an easier way around this.

@majora2007
Copy link
Member

I think the white theme and paper theme probably need someone to take a good look and remove what isn't sensible. For the dark theme, those css rules make sense to make the pages render well most of the time. For white/paper, they were probably copy/pasted. No one has brought them up as an issue till now.

I'm open to a PR RedstoneFlux. If you wait for me, it may take a long time. I have limited bandwidth.

@Redst0neFlux
Copy link
Author

Alright, I'll try removing some rules and see if that breaks anything!

@Redst0neFlux Redst0neFlux linked a pull request Dec 20, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage Needs to be triaged by a developer and assigned a release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants