View Single Post
Old 09-08-2025, 08:27 AM   #1
Slevin#7
Connoisseur
Slevin#7 began at the beginning.
 
Posts: 73
Karma: 10
Join Date: May 2025
Device: iPad
How to Set Link Color for Apple Books in Dark Mode?

I have an EPUB containing links which I wanna apply specific colors to. This works well for all e-readers I've tested so far, except for Apple Books which refuses to display any other color for links than the default blue.

The currently applied CSS rules are:

Code:
@media (prefers-color-scheme: dark) {
  a,
  a:link,
  a:visited,
  a:hover,
  a:focus,
  a:active {
                      color: #cc0000 !important;
    -webkit-text-fill-color: #cc0000 !important;
  }
}
And the HTML has the required Apple specific dark-mode class "ibooks-dark-theme-use-custom-text-color" set on the html-tag.

Does anybody know how to enforce Apple Books to style the links in dedicated colors?

I append an example ebook which as said works almost everywhere - but unfortunately only almost...
Attached Files
File Type: epub apple_books_dark_mode_link_test.epub (3.0 KB, 42 views)
Slevin#7 is offline   Reply With Quote