Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 03-14-2016, 06:59 PM   #1
bookman156
Addict
bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.
 
Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
CSS validation uses wrong validator?

The 'Validate Stylesheets With W3C' option under 'Tools' gave me repeated errors. But this was because it was validating against CSS 2.1 instead of CSS 3.

When I manually checked for myself by uploading the CSS file I got no errors, because it validated against CSS 3.

I'm not sure why when the CSS is uploaded by Sigil it is being checked against CSS 2.1 and not 3.
bookman156 is offline   Reply With Quote
Old 03-14-2016, 07:32 PM   #2
bookman156
Addict
bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.
 
Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
I've since discovered this thread:

https://www.mobileread.com/forums/sho...d.php?t=206894

Seems the problem has been around for a long time.

I wasn't aware that CSS 2.1 was supposedly 'closer' to the epub 2 standard than CSS 3. That seems crazy, but then I'm new to epub (but not to CSS). Does the epub standard specify a specific level of CSS? I was using CSS like font-family and font-style and font-weight on websites an aeon ago, so it is interesting to see that CSS 2.1 regards these as errors. But I can't believe that epub doesn't like them. Clearly Sigil needs to specify CSS 3 or have it unspecified. Why was CSS 2.1 specified at all, when these things aren't even an error in CSS 2.0?
bookman156 is offline   Reply With Quote
Advert
Old 03-14-2016, 07:59 PM   #3
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,542
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Been an argument going on for a long time, but the short of it is: EPUB2 CSS validation in Sigil is probably going to continue to specify CSS 2.1 for the time being. Because yes ... CSS 2.1 is a much, much, much closer match for what EPUB2 allows than CSS 3 is. There's scads and scads of CSS 3 stuff that can't be used in an EPUB2 compared to the handful of things that are allowed in EPUB2 that CSS 2.1 balks at.

Having said that, however, this reminds me that we need to find a way to allow EPUB3s to specify CSS 3 when validating CSS

Last edited by DiapDealer; 03-14-2016 at 08:05 PM.
DiapDealer is offline   Reply With Quote
Old 03-14-2016, 08:51 PM   #4
bookman156
Addict
bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.
 
Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
I can understand that some of the more fancy CSS 3.0 would want to be ruled out, but the font rules are not fancy stuff, and are allowed in CSS 2.0. I'm not really sure what the difference is between CSS 2.0 and 2.1, but am curious what it is about CSS 2.1 that is closer to EPUB 2 than say CSS 2.0.

Is there a specific list somewhere of the CSS that EPUB 2 allows? Or is it the old problem of different readers having different ideas, the re-run of the old Internet Explorer problem.

Incidentally, does the epub validator check CSS compatibility?

http://validator.idpf.org/
bookman156 is offline   Reply With Quote
Old 03-14-2016, 09:04 PM   #5
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,732
Karma: 5703586
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by DiapDealer View Post
.
Having said that, however, this reminds me that we need to find a way to allow EPUB3s to specify CSS 3 when validating CSS
Yes in ResourceObjects/CSSResource.cpp there is a hard coded setting in the form. So we can make an argument and either set it via a SettingsStore setting or simply by epubversion. Each resource knows the epub version of the epub ebook it belongs to, so we can make this fix for Sigil-0.9.5 if people can decide on what they want: to set it from a Preference setting or automatically by epub version, or even both?

KevinH
KevinH is offline   Reply With Quote
Advert
Old 03-14-2016, 09:16 PM   #6
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,542
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
Yes in ResourceObjects/CSSResource.cpp there is a hard coded setting in the form. So we can make an argument and either set it via a SettingsStore setting or simply by epubversion. Each resource knows the epub version of the epub ebook it belongs to, so we can make this fix for Sigil-0.9.5 if people can decide on what they want: to set it from a Preference setting or automatically by epub version, or even both?

KevinH
I'm up for both, actually.

A user selectable setting for EPUB2 and EPUB3 that can be passed as an argument to the form submitted in ResourceObjects/CSSResource.cpp.

It may even be something I'm capable of doing!
DiapDealer is offline   Reply With Quote
Old 03-14-2016, 10:41 PM   #7
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,732
Karma: 5703586
Join Date: Nov 2009
Device: many
Sounds good to me. We can add it to the preference page (CleanSource or General) since I think both have room.
KevinH is offline   Reply With Quote
Old 03-15-2016, 02:23 AM   #8
bookman156
Addict
bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.
 
Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
If you can build that in, then why not have the ability to select validation against CSS 2.1 or CSS 3 irrespective of whether it is EPUB 2 or EPUB 3, because, frankly, even if working on EPUB 2 I still want to test against CSS 3 and if I can't do it automatically in Sigil I'll just have to do it manually outside. Making this a preference would be far more useful, since validation against CSS 2.1 isn't much use if valid styles that work in epubs are being reported as errors. So basically I have to trust myself not to use any style that won't work, which I'll see in testing anyway. All I want to know from the validator is that my CSS file itself is correctly formed and doesn't contain errors as a CSS file, no matter whether I'm using EPUB 2 or 3. This is the proper use of a CSS validator.

Last edited by bookman156; 03-15-2016 at 02:26 AM.
bookman156 is offline   Reply With Quote
Old 03-15-2016, 02:38 AM   #9
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Quote:
Originally Posted by bookman156 View Post
Is there a specific list somewhere of the CSS that EPUB 2 allows? Or is it the old problem of different readers having different ideas, the re-run of the old Internet Explorer problem.
Yes, there is. It is specified in the specifications of course. More specifically, it is here.
Toxaris is offline   Reply With Quote
Old 03-15-2016, 02:39 AM   #10
bookman156
Addict
bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.
 
Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
In fact, having the ability to choose CSS model for validation seems far more useful than choosing EPUB 2 or 3, since the correlation between EPUB and CSS is obviously currently inexact. Having CSS version as a selector in the drop-down menu also means I could easily validate against both CSS 2.1 and 3.
bookman156 is offline   Reply With Quote
Old 03-15-2016, 02:46 AM   #11
bookman156
Addict
bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.
 
Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
Quote:
Originally Posted by Toxaris View Post
Yes, there is. It is specified in the specifications of course. More specifically, it is here.
Thanks.

This underscores that CSS validation should be about whether the CSS file is syntactically correct, not about whether epubs do or do not support various cherry-picked parts of the CSS specification. If I use CSS that is too advanced for epub, I'll soon find out, but if I have missed off a semi-colon from my CSS or not enclosed a font-name in quote-marks I'd rather just discover that than try to second-guess which CSS spec best suits EPUB 2 or 3, when it is essentially a bit of a guessing game when perfectly good CSS for some reason doesn't make it in CSS 2.1 yet is given the thumbs up in the document you have linked to.

Last edited by bookman156; 03-15-2016 at 02:58 AM.
bookman156 is offline   Reply With Quote
Old 03-15-2016, 03:19 AM   #12
bookman156
Addict
bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.
 
Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
From: http://www.idpf.org/epub/30/spec/epub30-changes.html

I note it says: "EPUB 3 defines a profile of CSS based on CSS 2.1 with added modules from CSS3, whereas EPUB 2 was based on a specific subset of CSS 2."

So I'm not sure where this idea that EPUB 2 is based on CSS 2.1 comes from, when it says there that it is based on a portion of CSS 2.
bookman156 is offline   Reply With Quote
Old 03-15-2016, 06:15 AM   #13
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,542
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by bookman156 View Post
So I'm not sure where this idea that EPUB 2 is based on CSS 2.1 comes from, when it says there that it is based on a portion of CSS 2.
You'll notice that no one in this thread has claimed that EPUB2 "is based on" CSS 2.1. Rather that; where a single specification must be chosen for the inexact validation of CSS in an EPUB2, CSS 2.1 was the lesser of two evils.

Regardless: the user will have a preference setting (in the next version) allowing them to choose which CSS version they wish to validate against.

Last edited by DiapDealer; 03-15-2016 at 06:25 AM.
DiapDealer is offline   Reply With Quote
Old 03-15-2016, 07:01 AM   #14
rubeus
Banned
rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.
 
Posts: 272
Karma: 1224588
Join Date: Sep 2014
Device: Sony PRS 650
Quote:
Originally Posted by bookman156 View Post
So I'm not sure where this idea that EPUB 2 is based on CSS 2.1 comes from
Well, there is no CSS Standard for Epub2. Many Readers use RMSDK from Adobe and even this is depending on the version. RMSDK adopts a lot of CSS 2 and very very little things from CSS3, and other readers do implement their own subset fo CSS and are doing the whole formatting by their own often by ignoring the internal stylesheet and using their own stylesheet.

The way its chosen now is closest to RMSDK 2.x and if you wanna sell books working on a lot of different readers its a good way to stick there.
rubeus is offline   Reply With Quote
Old 03-15-2016, 10:03 AM   #15
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,732
Karma: 5703586
Join Date: Nov 2009
Device: many
For the record ... The current epub 3 spec is version "3.0.1" (not to be confused with the recently proposed epub 3.1 spec that really should have been called epub 4) that basically specifies CSS 3 with some extensions.

The full link to the relevant section regarding stylesheets is provided here:

http://www.idpf.org/epub/301/spec/ep...s.html#sec-css

As far as I know, no one implements the epub3 epub specific -epub extensions to CSS 3.
KevinH is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Suggestion] Sigil validator should check missing type="text/css" attribute quiris Sigil 13 01-21-2018 02:00 PM
W3C css Validator problem? pete6055 Sigil 14 02-28-2013 09:19 AM
CSS validation error kamanza Sigil 3 12-17-2012 04:40 PM
CSS validation error kamanza Conversion 11 12-12-2012 02:21 AM
ADE breaks CSS --> CSS Validation: Parse Error / Value Error dasboeh ePub 4 12-10-2012 03:25 AM


All times are GMT -4. The time now is 10:44 PM.


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