Quantcast
Channel: MobileRead Forums
Viewing all articles
Browse latest Browse all 50069

How to Set Link Color for Apple Books in Dark Mode?

$
0
0
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)

Viewing all articles
Browse latest Browse all 50069

Latest Images

Trending Articles



Latest Images