Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
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:
https://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
Old 02-01-2011, 04:13 AM   #2
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
These are probably bugs. Report them on the FlightCrew issue tracker (NOT on the Sigil tracker).
Valloric is offline   Reply With Quote
Advert
Old 02-01-2011, 04:42 AM   #3
cuthbert19
Enthusiast
cuthbert19 once ate a cherry pie in a record 7 seconds.cuthbert19 once ate a cherry pie in a record 7 seconds.cuthbert19 once ate a cherry pie in a record 7 seconds.cuthbert19 once ate a cherry pie in a record 7 seconds.cuthbert19 once ate a cherry pie in a record 7 seconds.cuthbert19 once ate a cherry pie in a record 7 seconds.cuthbert19 once ate a cherry pie in a record 7 seconds.cuthbert19 once ate a cherry pie in a record 7 seconds.cuthbert19 once ate a cherry pie in a record 7 seconds.cuthbert19 once ate a cherry pie in a record 7 seconds.cuthbert19 once ate a cherry pie in a record 7 seconds.
 
Posts: 48
Karma: 1916
Join Date: Sep 2010
Device: Cybook Opus
I can't actually find the "background: url(...)" in the epub standard specificications (here) ... is it actually admissible? Maybe that's why the nook freezes?
cuthbert19 is offline   Reply With Quote
Old 02-01-2011, 06:59 AM   #4
Perkin
Guru
Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.
 
Perkin's Avatar
 
Posts: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
Shouldn't there not be a space between 'src' and ':' in the lines

Quote:
src : url('../Fonts/OFLGoudyStM.otf')
AND
Quote:
src : url('../Fonts/OFLGoudyStM-Italic.otf')

Edit:
Disregard as OP had done that already.

Last edited by Perkin; 02-01-2011 at 08:04 AM.
Perkin is offline   Reply With Quote
Old 02-01-2011, 07:10 AM   #5
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
"background: url..." is valid, but I'll have to check the CSS specs to see if whitespace is allowed between the colon and the "src".
Valloric is offline   Reply With Quote
Advert
Old 02-01-2011, 08:03 AM   #6
Perkin
Guru
Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.
 
Perkin's Avatar
 
Posts: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
I read somewhere that having comments in the css could cause validation fails, if you remove the comment, does it check out OK then?

Edit:
See topic here, for more info
https://www.mobileread.com/forums/sho...d.php?t=108954

Last edited by Perkin; 02-01-2011 at 08:21 AM. Reason: More info
Perkin is offline   Reply With Quote
Old 02-01-2011, 09:23 AM   #7
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
The comments aren't contributing to the failure, though I did go ahead and try deleting them just to double-check for you. Valloric just posted a fix for this, looks like background and background-image weren't explicitly called out before in the reachability analysis.
ldolse is offline   Reply With Quote
Old 02-01-2011, 10:43 AM   #8
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by Valloric View Post
"background: url..." is valid, but I'll have to check the CSS specs to see if whitespace is allowed between the colon and the "src".
Actually, as cuthbert19 says, the spec lists "background-color", but not "background" (or "background-image"), which means it is not supported. Although it is strictly not an error, because in CSS unsupported properties are just ignored, so, from an ePUB perspective, it is like a harmless comment (except that it might be recognized by some readers).

As for the space, the CSS spec says:

A declaration is either empty or consists of a property name, followed by a colon (:), followed by a property value. Around each of these there may be white space.
Jellby is offline   Reply With Quote
Old 02-01-2011, 11:05 AM   #9
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
Quote:
Originally Posted by Jellby View Post
Actually, as cuthbert19 says, the spec lists "background-color", but not "background" (or "background-image"), which means it is not supported. Although it is strictly not an error, because in CSS unsupported properties are just ignored, so, from an ePUB perspective, it is like a harmless comment (except that it might be recognized by some readers).
True, but both Sigil and FlightCrew wouldn't be hurt by preparations for EPUB3. Yes, that spec is still a work in progress, but it won't be for long. I'd hate to start adding checks that I'll have to remove in a few months.

Quote:
Originally Posted by Jellby View Post
As for the space, the CSS spec says:

A declaration is either empty or consists of a property name, followed by a colon (, followed by a property value. Around each of these there may be white space.
Yes, I read that too after my last comment. I was pretty sure the space was allowed, but checking the spec can't hurt.
Valloric is offline   Reply With Quote
Old 02-02-2011, 04:17 AM   #10
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by Valloric View Post
True, but both Sigil and FlightCrew wouldn't be hurt by preparations for EPUB3. Yes, that spec is still a work in progress, but it won't be for long. I'd hate to start adding checks that I'll have to remove in a few months.
If I were doing a validator, I would issue a warning (not an error) at the use of any CSS property or value not supported in the spec. It shouldn't be too hard to later add an option to validate against other versions of the spec.

In Sigil, it would be nice if unsupported properties could be disabled, so that they don't show in the book view.
Jellby is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
stupid question about epub? (nook + css) hapax legomenon ePub 0 10-31-2010 03:35 AM
Archived items question Corran006 Amazon Kindle 1 08-28-2010 02:52 AM
Basic CSS Font family question! kjk ePub 2 05-27-2010 01:28 PM
A question about CSS: widows and orphans Jellby ePub 5 08-31-2009 03:54 PM
Opening of referenced PDF file DrBibber iRex 2 07-30-2006 09:28 PM


All times are GMT -4. The time now is 01:49 PM.


MobileRead.com is a privately owned, operated and funded community.