View Single Post
Old 01-18-2013, 06:03 PM   #6
dgatwood
Curmudgeon
dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.
 
dgatwood's Avatar
 
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
Quote:
Originally Posted by JSWolf View Post
You can do some of your fancy formatting in Sigil. You can't do the "do this if portrait or do that if landscape" as that's not ePub. That's iBooks.
That's incorrect. What you're talking about involves simple media queries, which despite being CSS3 features, are fully spec-compliant with the CSS2 specification in that compliant renderers are required to "graceful degrade" by ignoring the bits that they don't understand.

Further, the EPUB standard does not say that books cannot use later versions of the CSS spec than CSS2. In fact, it explicitly says that the reader must tolerate later versions of the spec.

"A Reading System may support CSS properties beyond the OPS CSS 2.0 required subset, however, any unsupported properties must be gracefully degraded per the CSS 2.0 specification." (Open Publication Structure (OPS) 2.0.1 v1.0, section 1.3.5.)

Therefore, an EPUB that takes advantage of CSS3 features—media queries, box shadows, multicolumn layouts, etc.—is a legal EPUB, and fully complies with the EPUB 2.0.1 specification, because the CSS 2.0 spec's rules for "gracefully degrading" say that a client must ignore any rules that it doesn't understand. Period. You can even legally include vendor-specific rules, and as long as they are structured in a fashion that complies with the graceful degradation rules of the CSS spec, a reader is required to ignore them. For example, the following should not break any compliant reader:

Code:
-mumblereader-eat-cookies-like-a-monster: answer("Sure, why not?");
It is garbage, of course, and no reader will actually do anything with it, but it is legal. And the EPUB specification says that readers are allowed to interpret it if they know how, so if I write a reader called "mumblereader", it could display an animation and speech synthesis for a certain blue Muppet® when it sees that property....

However, with that said, you cannot be guaranteed that all readers (or any readers, for that matter) will support CSS3 features. For this reason, spec-compliant content must also be designed in such a way that it degrades gracefully on readers that support only the CSS functionality defined by the EPUB subset of CSS2.

<rant>Also, because Adobe apparently doesn't know what "gracefully degrades" means and/or didn't bother to read the part of the CSS specification where it explains the steps by which a conforming interpreter should skip unknown CSS declarations, you will probably have to segregate any @ rules other than @font-face into a separate file, which ADE will fail to parse and will thus ignore in its entirety.</rant>

But I digress.

Last edited by dgatwood; 01-18-2013 at 06:07 PM.
dgatwood is offline   Reply With Quote