View Single Post
Old 02-01-2011, 03:40 AM   #1
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
Question about validation and items referenced in css

I just saw this thread about a particular epub crashing Nooks:
http://www.mobileread.com/forums/showthread.php?t=97542

And just for the hell of it decided to check what Sigil's epub validation said about the matter.

The only error was an issue with the SVG definition, easily enough fixed.

There were thee warnings about manifested but unreachable items though - the creator of the epub embedded his fonts and a background gif, all defined in the css, the items looked like this:
Code:
@font-face {
  font-family: "Goudy";
  src : url('../Fonts/OFLGoudyStM.otf')
}

@font-face {
  font-family: "Goudy Italic";
  src : url('../Fonts/OFLGoudyStM-Italic.otf')
}

#content h3 {
	text-transform: uppercase;
	text-align: center;
	margin: 1.5em 0 1.5em 0;
	font-size: 1.8em;
	line-height: 1.5em;
	letter-spacing: .1em;
	padding-bottom: 0.75em; /* space between text and image */
	background: url('../Images/underline.gif') no-repeat bottom center;	
}
So they are all technically 'reachable' at least from ADE's and QTWebkit's perspective - i.e. they were rendered. I was able to remove the two warnings for the fonts by changing 'src :' to 'src:'. I don't see a way to remove the warning about the background url.

Is this an example of the validation being too strict, or is the css written incorrectly?

This is all purely academic, just trying to understand how things work a bit better.

Last edited by ldolse; 02-01-2011 at 03:47 AM.
ldolse is offline   Reply With Quote