View Single Post
Old 10-11-2016, 10:43 PM   #7
Gregg Bell
Gregg Bell
Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.
 
Gregg Bell's Avatar
 
Posts: 2,266
Karma: 3917598
Join Date: Jan 2013
Location: Itasca, Illinois
Device: Kindle Touch 7, Sony PRS300, Fire HD8 Tablet
Quote:
Originally Posted by Doitsu View Post
@Gregg Bell:

AFAIK, CSS namespace declarations are a CSS3-only feature and will always generate W3C error messages if the selected Stylesheet Validation Level is CSS Level 2.1.

You could theoretically change the CSS level via Edit > Preferences > Settings > General Settings, and if you change the value to CSS Level 3, the W3C validator will no longer display a namespace error message. However, selecting CSS Level 3 isn't recommended for epub2 book stylesheets, because the epub2 standard was based on CSS Level 2.1 and some older epub engines might not support CSS3-only elements.

Therefore it's better to simply delete CSS namespace declarations in epub2 books, unless the (X)HTML files contain non-standard namespace declarations.

AFAIK, CSS namespace declarations are only required for epub3 book stylesheets and only if you want select elements with epub:type attributes.

For example the following stylesheet code:

Code:
@namespace epub "http://www.idpf.org/2007/ops";

*[epub|type='pagebreak'] { display: none; }
will hide epub3 page number targets formatted as:

Code:
<span epub:type="pagebreak" id="page1">1</span>
Thanks Doitsu. Yeah, I don't want to mess with the preferences so I'll just delete the namespace. But I do need to delete the below:

Code:
@namespace "http://www.w3.org/1999/xhtml";
correct?

Not just:

Code:
@namespace
correct?
Gregg Bell is offline   Reply With Quote