03-03-2011, 05:20 AM | #1 |
Addict
Posts: 265
Karma: 512072
Join Date: Aug 2009
Location: Helsinki, Finland
Device: Writing my first short story: Guardian Angel
|
CSS files not being used??
Hello all,
I have three CSS files in the Styles folder: main.css page.css titles.css in main.css I have this in the beginning: @import "page.css"; and the same in titles.css When I validate the EPUB file, I get the following error: OEBPS/Styles/page.css This resource is present in the OPF <manifest>, but it's not reachable (it's unused). SO what is this all about? If I remove the page.css file the layout of my ebook looks different so clearly it is used. |
03-03-2011, 06:23 AM | #2 |
Enthusiast
Posts: 48
Karma: 1916
Join Date: Sep 2010
Device: Cybook Opus
|
I think the correct syntax is something like:
Code:
@import url('../Styles/page.css'); |
Advert | |
|
03-03-2011, 06:40 AM | #3 |
Addict
Posts: 265
Karma: 512072
Join Date: Aug 2009
Location: Helsinki, Finland
Device: Writing my first short story: Guardian Angel
|
FlightCrew?
|
03-03-2011, 06:42 AM | #4 |
Addict
Posts: 265
Karma: 512072
Join Date: Aug 2009
Location: Helsinki, Finland
Device: Writing my first short story: Guardian Angel
|
No, still gives the same error.
|
03-03-2011, 06:46 AM | #5 | |
Guru
Posts: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
|
FlightCrew is the validation component in Sigil.
As a simple workaround, just include a line in one of the html files that links to the 'missing' css file. So the file will be accessed directly at least once. Quote:
|
|
Advert | |
|
03-03-2011, 06:50 AM | #6 |
Guru
Posts: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
|
Does the epub look fine on an actual reader rather than in Sigil?
If so it's probably a missing check or bug as cuthbert said. If it doesn't then it's probably a mis-use of the import |
03-03-2011, 07:13 AM | #7 |
Addict
Posts: 265
Karma: 512072
Join Date: Aug 2009
Location: Helsinki, Finland
Device: Writing my first short story: Guardian Angel
|
This did thr trick, but before this addition the epub file looked just fine on BeBook Mini.
|
03-03-2011, 09:33 AM | #8 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
I think FlightCrew does not check the @import. I think I remember that Valloric said somewhere that FlightCrew does not do a check of the stylesheet at the moment.
If that is the case, than FC would not know of the @import and therefore would correctly say that the stylesheet is not used. The message should say perhaps it is unused in the xhtml. In this case you could ignore this error, but just because you know the source of the error. |
03-03-2011, 10:16 AM | #9 | |
Created Sigil, FlightCrew
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
Quote:
|
|
03-03-2011, 10:22 AM | #10 |
Created Sigil, FlightCrew
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
Try it with @import url("page.css");.
The @import "page.css"; syntax is valid, but because of a bug in FC, this is not recognised. Please report this on the tracker. |
03-03-2011, 03:06 PM | #11 | |
Addict
Posts: 265
Karma: 512072
Join Date: Aug 2009
Location: Helsinki, Finland
Device: Writing my first short story: Guardian Angel
|
Quote:
Where is the Tracker site for Sigil? |
|
03-03-2011, 03:15 PM | #12 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
|
03-03-2011, 04:26 PM | #13 | |
Created Sigil, FlightCrew
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
Quote:
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CSS to "wrap" text between two .xhtml files? | december | Sigil | 28 | 12-06-2013 03:29 PM |
css pseudo elements and adjacent combinators in extra css? | ldolse | Calibre | 2 | 12-21-2010 05:09 PM |
Multiple CSS Files | jjm6383 | Sigil | 2 | 06-28-2010 05:44 PM |
Sigil and CSS files | crutledge | Sigil | 6 | 05-20-2010 09:02 AM |
Help! Newbie having problems converting HTML/CSS files | jackie_w | Calibre | 6 | 09-14-2009 04:53 PM |