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 01-28-2013, 10:00 AM   #1
Turtle91
Guru
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 669
Karma: 3807234
Join Date: Dec 2012
Location: Shannon, Ireland today
Device: iPhone 5/iPad 1&2/Surface Pro/Kindle PW
Flightcrew error or bad coding?

Hi,
I've been playing with different ways of inserting images at the beginning of each chapter. Normally I would just insert a <div|p> tag with the appropriate class and an <img> tag. But I was saying to myself: "Self, there has to be a more automatic way of doing this that decreases bloat."

I used the :after pseudo selector in my CSS like this:

Quote:
h3:after {
content:url("../Images/head_ch.jpg");
display:block;
text-align:center;
margin:0 auto;
}
It actually works perfectly!

The problem is that when I check the ePub with Flightcrew I get an error that my image is not being used:
Quote:
This resource is present in the OPF <manifest>, but it's not reachable (it's unused).
It IS being used, just not from one of the html pages...

I figured since ":after" is implemented in CSS2 that it would be supported and recognized by the current version of Sigil/Flightcrew...

Anyone have any ideas - Is this warning something I can safely ignore?
Turtle91 is offline   Reply With Quote
Old 01-28-2013, 10:43 AM   #2
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: 9,424
Karma: 43260000
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Not everything implemented in CSS2 is valid in the ePub2 spec... which is what Flightcrew is focused on compliance with. I believe pseudo elements are in one of the dark-gray areas of epub2 compliance... if not downright unsupported.

Last edited by DiapDealer; 01-28-2013 at 10:48 AM.
DiapDealer is offline   Reply With Quote
Old 01-28-2013, 10:57 AM   #3
Turtle91
Guru
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 669
Karma: 3807234
Join Date: Dec 2012
Location: Shannon, Ireland today
Device: iPhone 5/iPad 1&2/Surface Pro/Kindle PW
Really?? No Pseudo Classes?!!? I checked the 2.01 OPS and section 3.1 Selectors says:

Quote:
Reading Systems must support all CSS2 selectors, including pseudo-elements and pseudo-classes. However, certain pseudo-classes may not be applicable to all Reading Systems (e.g. hover for devices with a touch screen) and may not result in any rendering on such devices.
{emphasis was already included}

I could see if a particular device/app didn't fully implement the spec, but I would hope Flightcrew would follow it "exactly"...or at least try to.

Maybe I'm reading the spec wrong?
Turtle91 is offline   Reply With Quote
Old 01-28-2013, 11:05 AM   #4
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: 9,424
Karma: 43260000
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I did say I believe… so you very well could be correct.

If so, it could clearly be a gap in Flightcrew's compliance-check. What does the official IDPF ePubchecker have to say about it?
DiapDealer is offline   Reply With Quote
Old 01-28-2013, 11:10 AM   #5
Turtle91
Guru
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 669
Karma: 3807234
Join Date: Dec 2012
Location: Shannon, Ireland today
Device: iPhone 5/iPad 1&2/Surface Pro/Kindle PW
now you gone an dunnit...I'm going to have to actually install it...and remember what jars are.....hasn't anyone developed a nice ePubchecker GUI yet?
Turtle91 is offline   Reply With Quote
Old 01-28-2013, 11:14 AM   #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: 9,424
Karma: 43260000
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Just use the online version.
DiapDealer is offline   Reply With Quote
Old 01-28-2013, 11:20 AM   #7
theducks
Grand Sorcerer
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 15,100
Karma: 5939999
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by Turtle91 View Post
Really?? No Pseudo Classes?!!? I checked the 2.01 OPS and section 3.1 Selectors says:

{emphasis was already included}

I could see if a particular device/app didn't fully implement the spec, but I would hope Flightcrew would follow it "exactly"...or at least try to.

Maybe I'm reading the spec wrong?
forget 'must'

Even if flightcrew passes...

Those pesky manufacturers do it their way

Go read the EPUB forum and see all the workarounds (or just plain give-ups) needed
theducks is offline   Reply With Quote
Old 01-28-2013, 12:31 PM   #8
Turtle91
Guru
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 669
Karma: 3807234
Join Date: Dec 2012
Location: Shannon, Ireland today
Device: iPhone 5/iPad 1&2/Surface Pro/Kindle PW
Actually that wasn't too bad. I ended up using elibrarans batch file process and set it up to drag&drop the epub onto it...worked great. The only downside is having to have java installed...with all of its inherent security risks...

The result:

Quote:
Epubcheck Version 3.0

Validating against EPUB version 2.0
No errors or warnings detected.
So apparently ePubcheck3 says it's good to go.

- It displays fine in Sigil
- It displays fine in ePubReader plugin for Firefox
- It displays fine in Azardi
- It displays fine in Kobo iOS
- It displays fine in Stanza iOS
- It displays perfectly in Marvin

- It compiles in ADE but does NOT display the images
- It compiles in Kindle Previewer but does NOT display the images (no warnings)
- It does NOT display the images in Nook/Blio/Bluefire/iBooks iOS


So...in my very Sherlock-like fashion I deduce that
1) Lots of vendors SUCK - and don't comply with standards!
2) The Pseudo elements/classes MUST be supported - but aren't

and the answer to my question

3) Yes, it appears that Flightcrew is giving an error where there should NOT be one...and it is safe to ignore the error (it's legal), but depending on the reader/device the user may or may not enjoy the produce of your hard earned efforts...
Turtle91 is offline   Reply With Quote
Old 01-28-2013, 12:35 PM   #9
st_albert
Fanatic
st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.
 
Posts: 549
Karma: 94420
Join Date: Feb 2010
Device: none
on a somewhat related topic, I have noticed that Sigil 0.6.2 release validates CSS against CSS level 3, whereas the latest git build validates against 2.1, and as far as I can understand it, the epub 2.0.1 specification is based on CSS 2.0:

Quote:
1.3.5: Relationship to CSS

This specification defines a style language based on CSS 2. (Note that the CSS 2.1 specification is currently still at "Working Draft" status.) The style sheet MIME type text/x-oeb1-css has been deprecated in favor of text/css.

The CSS-based style sheet constructs in this specification define required rendering functionality. To minimize the burden on Reading System developers and device manufacturers, not all CSS 2 properties are included. A few additional properties and values have been added to support page layout, headers, and footers. These, taken together, constitute the OPS CSS 2.0 required subset.

In a number of cases, this specification does not require Reading Systems to provide the full range of rendering that a standard CSS style sheet might request. For example, some Reading Systems will use monochrome displays. It would neither be acceptable to limit all Reading Systems to monochrome, nor to declare color use a non-standardized extension beyond OPS. In such cases, the CSS settings are allowed, and keep their meanings; but a conforming Reading System may gracefully degrade to a simpler rendering.

A conforming Reading System must render all OPS CSS 2.0 required subset properties. A Reading System may support CSS properties beyond the OPS CSS 2.0 required subset, however, any unsupported properties must be gracefully degraded per the CSS 2.0 specification.
It is of interest that validation against 2.1 throws errors that are not present in 2.0 or 3.0, yet the CSS is accepted by ADE (which I consider my harshest critic).

Just wondering what the rationale is for the choices / changes?

Albert (who apologizes for the attempted thread hijack)
st_albert is offline   Reply With Quote
Old 01-28-2013, 12:50 PM   #10
Turtle91
Guru
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 669
Karma: 3807234
Join Date: Dec 2012
Location: Shannon, Ireland today
Device: iPhone 5/iPad 1&2/Surface Pro/Kindle PW
Hey Albert, I don't mind...it does appear to be related...although I assume that if it is checking against CSS3 then pseudo elements/classes should DEFINITELY be supported.

I'm not sure of the intricacies of Flightcrew...perhaps one of the "brains" around here could enlighten us mere mortals.
Turtle91 is offline   Reply With Quote
Old 01-28-2013, 04:46 PM   #11
meme
Sigil developer
meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.
 
Posts: 1,275
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
CSS 2.1 was chosen for the Validation with W3C simply because I mistakenly thought that was the version used by EPUB 2. I mainly wanted to downgrade from CSS 3 in order to highlight some more obvious errors.

I just tried changing to CSS 2 on the W3C site but get some unexpected and undecipherable error message. So for now at least in the beta it will stay CSS 2.1. But if anyone who knows the spec and the site well can confirm it really should be CSS 2 let me know. It is only meant to be a helpful guide - and as everyone is aware, you still have to check on the actual readers to see what really happens.

In addition to FlightCrew picking up on "content" as the OP noted, I've noticed it also correctly picks up on 'background-image' not being valid. I've added an extra check in the Delete Unused Images / Files tool to check the CSS for references to images in that attribute (and 'background') - even though its not valid EPUB 2 its better to not delete it than to delete it.
meme is offline   Reply With Quote
Old 01-28-2013, 06:49 PM   #12
phossler
Addict
phossler can understand the language of future parallel dimensionsphossler can understand the language of future parallel dimensionsphossler can understand the language of future parallel dimensionsphossler can understand the language of future parallel dimensionsphossler can understand the language of future parallel dimensionsphossler can understand the language of future parallel dimensionsphossler can understand the language of future parallel dimensionsphossler can understand the language of future parallel dimensionsphossler can understand the language of future parallel dimensionsphossler can understand the language of future parallel dimensionsphossler can understand the language of future parallel dimensions
 
Posts: 363
Karma: 51406
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: kindle
Is there any reason why ADE would not show the :after jpg?

I made very simple epub in Sigil with a jpg and Sigil has no problems displaying it in BV. I get the FlightCrew warning, but I was expecting that.

Saving it and using ADE does not display the :after image, just the text.

Paul
phossler is offline   Reply With Quote
Old 01-28-2013, 07:24 PM   #13
Turtle91
Guru
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 669
Karma: 3807234
Join Date: Dec 2012
Location: Shannon, Ireland today
Device: iPhone 5/iPad 1&2/Surface Pro/Kindle PW
The only reason I can think of is that they did not feel it important enough to implement pseudo classes?? Or, more likely, they had already developed their own software to the point where changing it would cost too much, so they decided to continue as they were. Hopefully they will decide to become fully compliant in the (near) future...

If you are creating this ePub for yourself you can just use one of the better devices/apps to display...but if you are making it for others it is probably better to just put the <img> tag within the html document to make sure it gets displayed.

Last edited by Turtle91; 01-28-2013 at 07:26 PM.
Turtle91 is offline   Reply With Quote
Old 01-28-2013, 10:42 PM   #14
phossler
Addict
phossler can understand the language of future parallel dimensionsphossler can understand the language of future parallel dimensionsphossler can understand the language of future parallel dimensionsphossler can understand the language of future parallel dimensionsphossler can understand the language of future parallel dimensionsphossler can understand the language of future parallel dimensionsphossler can understand the language of future parallel dimensionsphossler can understand the language of future parallel dimensionsphossler can understand the language of future parallel dimensionsphossler can understand the language of future parallel dimensionsphossler can understand the language of future parallel dimensions
 
Posts: 363
Karma: 51406
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: kindle
@Turtle91 -- Just for me, but it would have been nice to automatically get separators using :after. I was hoping I could added a gif or jpg as a fancy (and easy to see) heading marker

Both Calibre and Sigil display the epub properly, but ADE and my Kindle (after conversion)
don't seem to to honor the :after, or the others I tried

Code:
h3 {
	text-align:center;
	display:block;
	margin:0 auto;
}

h3:after {
	text-align:center;
	display:block;
	margin:0 auto;	
	content:url("../Images/130px-Pointy-Haired_Boss.jpg");
} 

h3:first-letter {
		font-size: 4em;
} 

h3:first-line {
		color:blue;
}


Thanks

Paul

Last edited by phossler; 01-28-2013 at 10:45 PM.
phossler is offline   Reply With Quote
Old 01-29-2013, 04:42 AM   #15
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: 6,259
Karma: 4801167
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by meme View Post
But if anyone who knows the spec and the site well can confirm it really should be CSS 2 let me know.
ePub uses its own subset of CSS, it's not 2 nor 2.1 nor 3, according to the spec:

This specification defines a style language based on CSS 2. (Note that the CSS 2.1 specification is currently still at "Working Draft" status.)
[...]
A conforming Reading System must render all OPS CSS 2.0 required subset properties. A Reading System may support CSS properties beyond the OPS CSS 2.0 required subset, however, any unsupported properties must be gracefully degraded per the CSS 2.0 specification.

Regarding the syntax, I don't think there's any difference between standard CSS and ePub-flavoured one, but as for the supported properties and values there are some important changes/limitations.
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
Do Inadequate Writing Skills Engender Bad Coding? Prestidigitweeze News 81 11-30-2012 02:24 PM
error: bad character in group name? theleftymop Calibre 3 04-28-2012 03:31 PM
bad database error in linux mint 10 after reinstall gbowlds Calibre 2 10-14-2011 01:57 AM
Flightcrew validation error Jellby Sigil 6 09-01-2011 09:20 AM
Getting Bad Database Error oak Calibre 4 04-06-2010 08:10 AM


All times are GMT -4. The time now is 09:38 PM.


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