05-03-2014, 11:16 AM | #1 |
Guru
Posts: 815
Karma: 1029784
Join Date: May 2008
Location: Nebraska, USA
Device: PEZ, Color Libre, 2@Sony T1, Onyx i62HD
|
Epub Manual question
Is there a epub programming manual that lists the allowable commands in a CSS?
I'm trying to learn how to format my ebook, but I'd like to have a list of allowable commands and their syntax for the CSS. Thx AJ |
05-03-2014, 12:11 PM | #2 |
Addict
Posts: 398
Karma: 96448
Join Date: Dec 2013
Device: iPad
|
All the commands from CSS Tutorial on http://www.w3schools.com/css/DEFAULT.asp
are supported on EPUB 2. EPUB 3 supports both CSS 2.1 (the one I mentioned above) and CSS3, so just go over these two and you should be a master of styling |
Advert | |
|
05-03-2014, 01:38 PM | #3 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Not the full spectrum of CSS 2.1 is supported. For the full list that is supported in ePUB2, which is usually the only format you need to worry about, can be found at the idpf site: http://www.idpf.org/epub/20/spec/OPS...aft.htm#TOC3.0
|
05-04-2014, 03:47 AM | #4 |
Addict
Posts: 398
Karma: 96448
Join Date: Dec 2013
Device: iPad
|
Which CSS 2.1 rules devices don't support?
|
05-04-2014, 05:42 AM | #5 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Mostly things that is for text-to-speech and things like that. Also several pseudo-classes and pseudo-elements are not supported like hover. However, most readers do not support pseudo-elements anyway. In general you can say that the more complex the CSS will be, the less chance there is it will be supported at this time.
In paragraph 3.3 of the link I sent you can see what the default values are. There you can also see for example that the default value for the auto margin is 0. |
Advert | |
|
05-04-2014, 06:48 AM | #6 |
Color me gone
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
Centering of things like tables don't work for beans also. Even the workarounds for centering can cause issues like disappearing cell borders. The ways of making tables with css don't work on some machines either. Some machines don't support some kinds of fonts. There was also a recent discussion in this forum of how apple doesn't support the css that allows you to wrap around images.
If you check out postings by Hitch who owns a company that makes epubs for a living, she does into some detail on this aggravating problem. |
05-04-2014, 09:20 AM | #7 | |
Guru
Posts: 815
Karma: 1029784
Join Date: May 2008
Location: Nebraska, USA
Device: PEZ, Color Libre, 2@Sony T1, Onyx i62HD
|
Quote:
Thanks, I'll started reading this week. |
|
05-04-2014, 09:21 AM | #8 | |
Guru
Posts: 815
Karma: 1029784
Join Date: May 2008
Location: Nebraska, USA
Device: PEZ, Color Libre, 2@Sony T1, Onyx i62HD
|
Quote:
AJ |
|
05-04-2014, 11:09 AM | #9 | |
Addict
Posts: 398
Karma: 96448
Join Date: Dec 2013
Device: iPad
|
Quote:
Code:
Selector Example Example description :link a:link Selects all unvisited links :visited a:visited Selects all visited links :active a:active Selects the active link :hover a:hover Selects links on mouse over :focus input:focus Selects the input element which has focus ::first-letter p::first-letter Selects the first letter of every <p> element ::first-line p::first-line Selects the first line of every <p> element :first-child p:first-child Selects every <p> elements that is the first child of its parent ::before p::before Insert content before every <p> element ::after p::after Insert content after every <p> element :lang(language) p:lang(it) Selects every <p> element with a lang attribute value starting with "it" |
|
05-04-2014, 12:14 PM | #10 | ||
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
Quote:
|
||
05-04-2014, 12:22 PM | #11 | |
Wizard
Posts: 1,543
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
https://www.mobileread.com/forums/sho...d.php?t=212300 And if you do a search in the forum you also will find material about ::before and ::after. |
|
05-04-2014, 12:29 PM | #12 |
Addict
Posts: 398
Karma: 96448
Join Date: Dec 2013
Device: iPad
|
Well, they are to me since I never had to use them and I've been coding for quite a few years now. By the way, what Doitsu said there on the link you posted is conflicting with what Toxaris said about CSS 2.1 pseudo elements not being supported.
|
05-04-2014, 01:42 PM | #13 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
It does not conflict at all. Those pseudo-elements are not supported on ADE readers and perhaps more. Since most of the ePUB readers are still based on ADE, my statement is still valid. They are according to the specs, but most readers ignore them.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre User Manual ePub vs. ADE | phossler | Calibre | 2 | 02-12-2014 11:23 PM |
Missing Epub help manual from website | cager | Calibre | 18 | 09-24-2013 04:19 PM |
Calibre User Manual as epub | tbullock | Introduce Yourself | 5 | 08-28-2011 04:29 AM |
EPUB for GIT User manual | miwie | Conversion | 2 | 07-20-2011 01:19 AM |
User Manual in ePub? | rogue_ronin | Calibre | 2 | 12-21-2009 02:28 PM |