![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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; } 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. |
![]() |
![]() |
![]() |
#2 |
Created Sigil, FlightCrew
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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).
|
![]() |
![]() |
Advert | |
|
![]() |
#4 | ||
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 657
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:
Quote:
Edit: Disregard as OP had done that already. Last edited by Perkin; 02-01-2011 at 08:04 AM. |
||
![]() |
![]() |
![]() |
#5 |
Created Sigil, FlightCrew
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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".
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 657
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 |
![]() |
![]() |
![]() |
#7 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
![]() |
![]() |
![]() |
#8 | |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,542
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
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. |
|
![]() |
![]() |
![]() |
#9 | |
Created Sigil, FlightCrew
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
Quote:
Yes, I read that too after my last comment. I was pretty sure the space was allowed, but checking the spec can't hurt. |
|
![]() |
![]() |
![]() |
#10 | |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,542
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
In Sigil, it would be nice if unsupported properties could be disabled, so that they don't show in the book view. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |