The EPUB 3.1 spec should address common reader styling scenarios #671

Open
ryanackley opened this Issue Feb 15, 2016 · 3 comments

Comments

Projects
None yet
4 participants
@ryanackley

As an implementor on the Readium EPUB viewer, one thing that was noticeably absent in the spec was how to handle reader preferences.

For example these three things were configurable in the readium epub reader: font size, background color, and font color.

There is no one way to deterministically set these properties in every epub content document. This is because the spec does not address this scenario in spite of almost every epub reader allowing users to change these styling properties.

It's a matter of overriding the author's css which isn't incredibly difficult but there are many edge cases and it feels overall like a very hacky approach.

@dauwhe

This comment has been minimized.

Show comment
Hide comment
@dauwhe

dauwhe Mar 3, 2016

Contributor

Are there issues with the CSS cascade and the concept of user styles which are inadequate to the task at hand?

Contributor

dauwhe commented Mar 3, 2016

Are there issues with the CSS cascade and the concept of user styles which are inadequate to the task at hand?

@JayPanoz

This comment has been minimized.

Show comment
Hide comment
@JayPanoz

JayPanoz Mar 17, 2016

Hi there, just providing a small example of default CSS used for user styles you can find in a RS:

  body {
    margin: {margin}px !important;
  }

  *, * *, *[class], *[class] *[class] {
    background: transparent !important;
    background-color: transparent !important;
    border-color: {foreground-color} !important;
    line-height: {line-height}% !important;
    text-align: none !important
  }

  html, html * {
    color: {foreground-color} !important;
  }

  a[href], a[href] * {
    color: {anchor-color} !important;
    text-decoration: underline !important;
  }

That is the most insane I've found for the moment—yep, we are indeed collecting RS' default CSS —but imho, we may have got a bigger than expected problem here… Or in other words, how can we even rely on the concept of cascade if RS are doing that?

Hi there, just providing a small example of default CSS used for user styles you can find in a RS:

  body {
    margin: {margin}px !important;
  }

  *, * *, *[class], *[class] *[class] {
    background: transparent !important;
    background-color: transparent !important;
    border-color: {foreground-color} !important;
    line-height: {line-height}% !important;
    text-align: none !important
  }

  html, html * {
    color: {foreground-color} !important;
  }

  a[href], a[href] * {
    color: {anchor-color} !important;
    text-decoration: underline !important;
  }

That is the most insane I've found for the moment—yep, we are indeed collecting RS' default CSS —but imho, we may have got a bigger than expected problem here… Or in other words, how can we even rely on the concept of cascade if RS are doing that?

@mattgarrish mattgarrish modified the milestone: EPUB 3.1 Apr 14, 2016

@mattgarrish mattgarrish added the Cat-CSS label May 3, 2016

@dauwhe

This comment has been minimized.

Show comment
Hide comment
@dauwhe

dauwhe Jun 30, 2016

Contributor

I don't think there's anything we can do in the context of the 3.1 revision. Personalization on the web is a large problem, and will require coordination between CSS, the A11Y community, etc.

Contributor

dauwhe commented Jun 30, 2016

I don't think there's anything we can do in the context of the 3.1 revision. Personalization on the web is a large problem, and will require coordination between CSS, the A11Y community, etc.

@dauwhe dauwhe removed this from the EPUB 3.1 milestone Jul 13, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment