Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 04-05-2013, 10:42 AM   #1
mattcurtis
Book Lover, Dev of Hyphen
mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.
 
mattcurtis's Avatar
 
Posts: 59
Karma: 2013886
Join Date: Apr 2013
Device: iPhone (Hyphen)
In an ePub reader, what are the rules for processing styles/CSS?

Hey guys (new user here),

I'm developing an ePub reader, and although I've searched and searched, I can't find the rules for ePub style processing/display. Here are my main questions:
  1. Should the reader display the styles/css referenced in the HTML of the current text file, or from the OPF?
  2. Is it mandatory to display CSS from the ePub?
  3. Where can I find more info on this?

Thanks in advance.
mattcurtis is offline   Reply With Quote
Old 04-05-2013, 11:11 AM   #2
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by mattcurtis View Post
Should the reader display the styles/css referenced in the HTML of the current text file, or from the OPF?
HTML. The OPF is just a reference of the files contained in the package (and some metadata, and in which order the HTML files should be displayed), but the rendering should be (mostly) according to XHTML+CSS.

Quote:
Is it mandatory to display CSS from the ePub?
According to the spec:

In a number of cases, this specification does not require Reading Systems to provide the full range of rendering that a standard CSS style sheet might request. For example, some Reading Systems will use monochrome displays. It would neither be acceptable to limit all Reading Systems to monochrome, nor to declare color use a non-standardized extension beyond OPS. In such cases, the CSS settings are allowed, and keep their meanings; but a conforming Reading System may gracefully degrade to a simpler rendering.

A conforming Reading System must render all OPS CSS 2.0 required subset properties. 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.

Quote:
Where can I find more info on this?
http://idpf.org/epub

and in particular, EPUB 2.0.1, OPS (http://www.idpf.org/epub/20/spec/OPS_2.0.1_latest.htm). Unless you want to write an EPUB 3 reader, then it's more complicated, but the info is there as well.
Jellby is offline   Reply With Quote
Advert
Reply

Tags
css, epub reader, styles

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bug in Kobo processing of epub files causing hang in "Processing content" BensonBear Kobo Reader 21 12-21-2012 05:47 AM
Modding Calibre CSS styles Olger Recipes 7 01-25-2012 05:08 AM
CSS Table Styles: Does it work? Alan Newson ePub 3 12-12-2011 03:54 PM
Tool to centralise css styles? snarkophilus ePub 7 07-01-2011 04:08 AM
Sigil styles and CSS View[+]Finder Sigil 4 05-27-2010 05:39 PM


All times are GMT -4. The time now is 08:22 PM.


MobileRead.com is a privately owned, operated and funded community.