Thread: Disapearing CSS
View Single Post
Old 03-24-2015, 05:45 PM   #47
alecE
Evangelist
alecE ought to be getting tired of karma fortunes by now.alecE ought to be getting tired of karma fortunes by now.alecE ought to be getting tired of karma fortunes by now.alecE ought to be getting tired of karma fortunes by now.alecE ought to be getting tired of karma fortunes by now.alecE ought to be getting tired of karma fortunes by now.alecE ought to be getting tired of karma fortunes by now.alecE ought to be getting tired of karma fortunes by now.alecE ought to be getting tired of karma fortunes by now.alecE ought to be getting tired of karma fortunes by now.alecE ought to be getting tired of karma fortunes by now.
 
alecE's Avatar
 
Posts: 412
Karma: 546196
Join Date: Mar 2009
Location: UK canal boat
Device: sony prs505, prs650, kobo Glo HD liseuses
I have occasionally seen this problem, not frequently enough to pin down the exact cause regrettably.
Currently running Sigil 0.8.2 on Windows 7 64-bit.

I have only seen this problem when creating an epub from a scanned pbook which has then been edited and cleaned up in an external editor. I have a number of template html files which define standard elements of an ebook (front cover, title page, colophon...) and a number of pre-defined chapter layouts. I have separate stylesheets for each pre-defined element.
The workflow process I have been using when this problem occurs is:
- Import some pre-defined html files into a new Sigil document;
- Import the corresponding pre-defined css files into the document;
- Link the stylesheets to the html templates;
(At this point, the styling applied to each html template is visible and working)
- Select which of my pre-defined html files I will use as a chapter template for the current document;
- Delete the unwanted html and the unwanted css files.

Sometimes, the css files which I have retained are still present in the epub, but the content has been deleted - opening the stylesheet reveals a blank page. This is of course discovered when the formatting for a particular template suddenly reverts to bog-standard.
I have not been able to consistently reproduce the behaviour. I don't find it to be a showstopper - I just copy/paste the missing css back into the blank stylesheet and save the epub pdq.
I have a suspicion that this may occur, inconsistently, if a new Sigil document has css files deleted from it before it has been saved for the first time, however the frequency of occurrence is so low that the little b*****d of a problem has defeated my efforts to trap it.
alecE is offline   Reply With Quote