02-26-2013, 05:41 PM | #1 |
Connoisseur
Posts: 68
Karma: 10
Join Date: Nov 2012
Device: none
|
W3C css Validator problem?
Hello,
Since loading Sigil 7, the W3C css validator defaults to the css 2.1 profile rather than css 3.0. Has anybody else seen this? While I can manually set the W3C validator profile, is there a way to do so within Sigil? By the way, this was not a problem in 6.2, but it began when I loaded Sigil 6.9. Thanks, |
02-26-2013, 06:48 PM | #2 | |
Resident Curmudgeon
Posts: 76,019
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
Advert | |
|
02-26-2013, 07:06 PM | #3 |
Well trained by Cats
Posts: 30,399
Karma: 58055234
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
It is not Logical!
Sigil does EPUB 2 (It just does not reject EPUB3) So it defaults to EPUB2 but does not prevent you from Validating EPUB3 Seems to me you already Win |
02-27-2013, 04:04 AM | #4 |
frumious Bandersnatch
Posts: 7,534
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
CSS2.1 and CSS3 have nothing to do with EPUB2 or EPUB3. Both EPUB versions support only a limited subset of CSS, and add some properties, so CSS validation will never be 100% safe. But it can help in finding syntax errors, and for that any CSS version will do.
|
02-27-2013, 06:10 AM | #5 |
Color me gone
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
I suspect the idea of the programmers is to provide something that is useful to validate the code, which it is. I think it is just a fair ways down the to-do list to try to keep up with the ever-shifting sands of standards, let alone devices whose observance of standards is always in the breach. There is always the on line check which is aimed at this as its main focus instead of a side issue.
|
Advert | |
|
02-27-2013, 01:21 PM | #6 |
Connoisseur
Posts: 68
Karma: 10
Join Date: Nov 2012
Device: none
|
Hi,
Thanks for the responses... But what I was asking was where are the settings for the W3C validator set in Sigil -- in the program itself, an ini file, a registry key, etc? I use @font-face a lot. It is not supported in css 2.1, which my Sigil install now defaults to. Previous versions either did not specify a profile or specified css 3.0. What this means is I now have to set-up the validator outside of my Sigil session -- not impossible or the worst thing, but still an extra step. By the responses to this thread, I assume I'm the only one having this problem. OK, but can anyone tell me how to fix it? |
02-27-2013, 01:51 PM | #7 |
frumious Bandersnatch
Posts: 7,534
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
It's not in CSS 2.1, but it is in CSS 2 (http://www.w3.org/TR/2008/REC-CSS2-2...t-descriptions). And, in fact, ePub 2.0.1 is based on CSS 2:
"This specification defines a style language based on CSS 2. (Note that the CSS 2.1 specification is currently still at "Working Draft" status.)" Maybe Sigil validation should default at CSS 2 instead. |
02-27-2013, 02:45 PM | #8 |
Sigil developer
Posts: 1,274
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
|
I'm willing to change it. It is hard-coded in the program, and was changed from 3 to 2.1 since it seemed 'closer' to EPUB 2. But as you have pointed out, EPUB 2's CSS isn't any specific version that is validated by the validator. If I recall, when I tested 2 I received other errors which were pretty annoying. Having it error on @font-face is a pain. I don't think dropping it to 2 will be good.
I'm thinking of putting it back to 3, and if it 'misses' some things because they are only valid in EPUB 3, well, that may be less people affected than if it stays 2.1. In any case, its only meant as quick check. |
02-27-2013, 07:39 PM | #9 |
Guru
Posts: 697
Karma: 150000
Join Date: Feb 2010
Device: none
|
I would vote for css 3. I like it to check for typos and syntax errors in my @font-face declarations as well as the rest of the code. (I'm much less likely to try using an unsupported feature than to make a typo!)
Just my $0.02 Albert |
02-27-2013, 08:52 PM | #10 |
Connoisseur
Posts: 68
Karma: 10
Join Date: Nov 2012
Device: none
|
Thank you.
I've tested: 3.0 works for sure, as should specifying no profile at all, because the css valiator uses the 3.0 profile by default. Might I suggest: pass the file just as you now do to the validator, but open the browser session on the "upload file page" -- http://validator.w3.org/#validate_by_upload -- so that the user can choose the option there. This might add as little as one additional click to the validation process (if using the 3.0 default), but you would never have to deal with this issue again; Sigil's code could remain static in this regard. You guys work hard enough, so why not let someone else do the maintenance, when new standards are adopted? |
02-27-2013, 09:50 PM | #11 | |
A Hairy Wizard
Posts: 3,208
Karma: 19000001
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Quote:
Just a thought. |
|
02-28-2013, 04:59 AM | #12 |
Guru
Posts: 718
Karma: 1085610
Join Date: Mar 2009
Location: Bristol, England
Device: PRS-T1, 1825PT, Galaxy Tab, One X, TF700T, Aura HD, Nexus 7
|
Personally, if none of the options are an actual match for the CSS used by epub's, then I'd rather not have this option of validating my CSS against an incorrect schema.
This could lead me to think everything is fine when it isn't. |
02-28-2013, 05:54 AM | #13 |
frumious Bandersnatch
Posts: 7,534
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Maybe "no profile" is best, if that checks only syntax, and not whether a particular property is defined or not.
|
02-28-2013, 05:54 AM | #14 |
Guru
Posts: 878
Karma: 2457540
Join Date: Nov 2011
Device: none
|
Useful, however, if only as a quick check for a malformed stylesheet? And, of course, you're not oblighd to use it!
|
02-28-2013, 09:19 AM | #15 |
Color me gone
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
I think it needs to be kept in mind that there is no silver bullet that is going to make sure everything works when no machine fully complies in the first place.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
W3C Validation says: Elements are undefined | verydeepwater | ePub | 7 | 01-11-2013 05:09 AM |
Problem with CSS. | mattst | Kindle Formats | 8 | 05-18-2012 01:13 AM |
CSS problem, can someone help me ? | Nick_1964 | General Discussions | 6 | 02-07-2012 11:02 AM |
Validator Problem - HELP!! | carmenchu | Sigil | 1 | 01-16-2011 07:33 AM |
Scope for W3C's Mobile Web Best Practices published | Colin Dunstan | Lounge | 1 | 09-17-2005 08:51 AM |