I can answer the very first part of your question. The long answer is that
<![CDATA[
]]>
looks pretty normal. It means the inline CSS can include stuff like this comment:
/* nested <i> tags */
without having the <i> interpreted as a HTML tag, which would cause an error because there's no closing </i> tag. (But it can't then include a literal "]]>", because that's how the end of the CDATA section is marked).
The CSS comment markers around it
/*<![CDATA[*/
are not strictly necessary. They're used to avoid making invalid HTML - CDATA is an XHTML-specific feature. (In HTML syntax, you can put anything except </style> inside a <style> tag). But this is EPUB, so it should always be parsed as XHTML.
The short answer is: best practice is _not_ to use inline stylesheets. If you can put your CSS in an external stylesheet
<link rel="stylesheet" type="text/css" href="..." />
then you won't have to worry about all these issues about mixing CSS and XML/HTML. It might well also stop Sigil (or whatever) inserting all those blank lines.
Last edited by sourcejedi; 07-29-2011 at 06:11 AM.
|