Apparently, KF8 supports quite a number of pseudo classes. I tested a couple more of them that I thought might be useful for automatically applying styles to unformatted paragraphs and found out that at least the following pseudo classes work:
:after
:before
:first-letter
:first-line
:first-of-type
:last-of-type
:lang(xx)
:nth-child(n)
:nth-child(even)
:nth-child(odd)
:nth-of-type(n)
:only-of-type
IMHO, some of them are redundant, while others provide useful automated formatting options. For example, you can use p:first-of-type:first-letter instead of explicitly selecting the paragraph by number with p:nth-child(2):first-letter to apply a dropcap style. You can also zebra-stripe table rows with :nth-child or insert text or images with :before and :after.
(I've attached the updated epub, which passes epubcheck, compiles without warnings but doesn't work with ADE, to the first post.)
Note that the text and symbols displayed in red in the KFPC screenshot have been created without modifying the .html file and without embedded fonts/images.
Last edited by Doitsu; 05-06-2013 at 01:14 PM.
|