View Full Version : epub CSS versus "Regular" CSS


konrad
02-08-2011, 09:29 PM
:blink: Hello everyone ,
I have a question about the difference between "Regular" (web page) Css and Css used in ePubs.What will actually validate (I use Flightcrew) and what wont and why.Is there some publication or a website that spells it out in a non-technical way that a beginner can understand ? I have consulted the ePub specs but they seem vague to me. I`ve tried applying what little Css I`ve learned about web pages to ePubs with limited success. If anyone can help me with this it would be appreciated. Thank you.

Toxaris
02-09-2011, 04:30 AM
The most CSS will work for ePubs regarding formatting. Some more 'advanced' stuff will not work. For some things you just need to try. It is specified in the specs and I believe Valloric used those specs for Flightcrew. However, specification in the specs will not garantuee that it will work on the readers. Implementation of the specs into the software is done by others, e.g. Adobe. They decide whether to implement the specs or not unfortunatly.

pdurrant
02-09-2011, 06:48 AM
:blink: Hello everyone ,
I have a question about the difference between "Regular" (web page) Css and Css used in ePubs.What will actually validate (I use Flightcrew) and what wont and why.Is there some publication or a website that spells it out in a non-technical way that a beginner can understand ? I have consulted the ePub specs but they seem vague to me. I`ve tried applying what little Css I`ve learned about web pages to ePubs with limited success. If anyone can help me with this it would be appreciated. Thank you.

There's not only the problem of what CSS is valid in an eub, there's also the problem of what CSS is supported by the various ePub implementations.

For the standard, the authoritative source is

http://www.idpf.org/2007/ops/OPS_2.0_final_spec.html#Section3.3

although you really need to read the other parts of the document too, not just section 3.3.

For individual implementations, I don't think there really is any documentation collected anywhere.

theducks
02-09-2011, 09:29 AM
:blink: Hello everyone ,
I have a question about the difference between "Regular" (web page) Css and Css used in ePubs.What will actually validate (I use Flightcrew) and what wont and why.Is there some publication or a website that spells it out in a non-technical way that a beginner can understand ? I have consulted the ePub specs but they seem vague to me. I`ve tried applying what little Css I`ve learned about web pages to ePubs with limited success. If anyone can help me with this it would be appreciated. Thank you.

Just to re-iterate
A valid EPUB CSS may not work as desired on all devices
Example
Centering an small HR (horizontal rule) with the CSS works in Sigil, and Calibre viewer but does not center on my Astak( w/ADE). You have to use less elegant coding :rolleyes:

Valloric
02-18-2011, 10:29 AM
FlightCrew (currently) does not perform validation of CSS files.

Then again, neither does EpubCheck, but FC will at least get this feature in the future.