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

Partial link styling in custom epub.css is overridden by ebook defaults. #182

Closed
jachiang opened this issue Mar 26, 2019 · 1 comment
Closed
Labels

Comments

@jachiang
Copy link

jachiang commented Mar 26, 2019

I have a document with many links in the body, and therefore having many underlined links make the text unwieldy to read. One solution is to restyle the links as italics for example (in epub3.css), and attempt to remove the underlining.

  /* Modified epub3.css in local css folder */

a {
  background: transparent;

  /* Custom link styling */
  font-style: italic;
  text-decoration: none;
}

And build with:

$ asciidoctor-epub3 -a epub3-stylesdir=css@ master-epub.asciidoc

Although the italic font-style will take effect in iBooks or Kindle Previewer3, all links remain underlined. Given the experience of creating the epub3, epub3-css-only style sheets, I wonder whether the maintainers of this project know if is possible to style links in ebook readers without these attributes being overriden in the ebook reader? Many thanks!

@slonopotamus
Copy link
Contributor

My Google-fu and some experiments say that it is impossible to disable link underlining on Kindle.

There's underlining even with the following CSS:

a         { text-decoration: none !important; }
a:link    { text-decoration: none !important; }
a:visited { text-decoration: none !important; }
a:hover   { text-decoration: none !important; }
a:active  { text-decoration: none !important; }

@slonopotamus slonopotamus added this to the support milestone Mar 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants