View Single Post
Old 10-11-2016, 05:24 AM   #5
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,731
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
@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 to 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>

Last edited by Doitsu; 10-12-2016 at 01:48 AM.
Doitsu is offline   Reply With Quote