MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Sigil (https://www.mobileread.com/forums/forumdisplay.php?f=203)
-   -   W3C css Validator problem? (https://www.mobileread.com/forums/showthread.php?t=206894)

pete6055 02-26-2013 06:41 PM

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,

JSWolf 02-26-2013 07:48 PM

Quote:

Originally Posted by pete6055 (Post 2438073)
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,

Sigil doesn't do ePub 3 yet.

theducks 02-26-2013 08:06 PM

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 :thumbsup:

Jellby 02-27-2013 05:04 AM

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.

mrmikel 02-27-2013 07:10 AM

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.

pete6055 02-27-2013 02:21 PM

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?

Jellby 02-27-2013 02:51 PM

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.

meme 02-27-2013 03:45 PM

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.

st_albert 02-27-2013 08:39 PM

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

pete6055 02-27-2013 09:52 PM

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?

Turtle91 02-27-2013 10:50 PM

Quote:

Originally Posted by pete6055 (Post 2439438)
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?

Or in the options page, allow a selection of 3, 2.1, 2, "ask me"...the "ask me" would take you to the upload file page, where the others would be the selected default.

Just a thought.

ghostyjack 02-28-2013 05:59 AM

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.

Jellby 02-28-2013 06:54 AM

Maybe "no profile" is best, if that checks only syntax, and not whether a particular property is defined or not.

exaltedwombat 02-28-2013 06:54 AM

Quote:

Originally Posted by ghostyjack (Post 2439657)
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.

Useful, however, if only as a quick check for a malformed stylesheet? And, of course, you're not oblighd to use it!

mrmikel 02-28-2013 10:19 AM

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.


All times are GMT -4. The time now is 08:55 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.