Thread: CSS Question
View Single Post
Old 11-09-2020, 09:03 PM   #20
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 47,063
Karma: 169810634
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by hobnail View Post
I suspect that if you use a "reset" that ereaders that don't know epub3 will at least render the unknown tags reasonably. For example, I use
Code:
article, aside, figcaption, figure, footer, header, main, nav, section {
  display: block;
}

address, article, aside, blockquote, canvas, dd, details, div, dl, dt, figcaption, figure, footer, h1, h2, h3, h4, h5, h6, header, hr, li, main, nav, ol, p, pre, section, summary, ul {
  margin: 0;
  padding: 0;
  line-height: inherit;
  font-style: normal;
  font-weight: normal;
}

a, abbr, b, bdi, bdo, cite, code, data, del, dfn, em, i, ins, kbd, mark, q, rp, rt, rtc, ruby, s, samp, small, span, strong, sub, sup, time, var {
  font-size: inherit;
  vertical-align: baseline;
  font-style: inherit;
  font-weight: inherit;
  color: inherit;
  text-decoration: none;
}
Which I copied from the blitz site.
Personally, I find the reset code almost useless and unneeded.

If I recall correctly, an epub2 renderer is supposed to disregard any elements and attributes it doesn't understand. The problem there is that if you are using the epub3 element for a purpose, now it doesn't happen and that can lead to an ugly rendering of the page. To fix this, you can end up with workaround code which is a pain to maintain since it may not render even close to the same on multiple devices/apps.
DNSB is offline   Reply With Quote