After reading
PoP's post about his 2D Transforms tests support in KF8, I did some tests too and found out that KF8 actually supports the
:first-letter selector even though the Kindle Publishing Guidelines say it doesn't
I used the following style to format the first letter of the first paragraph after the heading:
Code:
p:nth-child(2):first-letter {
font-family: sans-serif;
float: left;
font-size: 4em;
font-weight: bold;
margin-top: -0.2em;
margin-bottom: -0.2em;
margin-right: 5px;
color: red;
}
The
:first-letter selector makes it easy to add dropcaps to ebooks with lots of chapters in them without having to mark the first letter of the paragraph. (KF8 also supports
text-transform and
text-shadow as my cheesy heading example demonstrates.)
tl:dr some CSS3 styles that have so far only been available in iBooks ePubs can also be used in KF8 books.
EDIT: The following pseudo elements are known to work in KF8*:
Code:
: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
:not
*Warning: Even though these features were successfully tested with an old K3, the Kindle for PC app and both KindleGen 2.8 and Calibre generated KF8 files, there's no guarantee that they'll work with all KF8 enabled devices and apps.
Use at your own risk!