05-18-2010, 12:29 PM | #1 |
Junior Member
Posts: 2
Karma: 10
Join Date: May 2010
Device: iPad
|
Sigil styles and CSS
What is the relationship between styles in the CSS files associated with an ePbub being edited with Sigil and the sgc-# inline styles that are created by Sigil? I'm authoring/publishing eBooks for the iPad (and other devices) and need to have some control over the "style" as incorporated in the ePub. It seems that Sigil treats each xhtml file differently and the styles it creates have no common name between them. This makes editing more difficult for me.
In particular, I need to have an indented first line for normal <p> with block indented italicized quotations in some places. I did RTFM first and tried using the WYSIWYG tools, but the resulting ePub, while viewable on my iPad, failed the epubcheck 1.0.5 due to numerous "text not allowed" errors. Great program and thanks for your work! |
05-18-2010, 01:32 PM | #2 |
Created Sigil, FlightCrew
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
The style rules in the sgc-# classes are actually in your document already as contents of the style attribute on the XHTML elements, the so-called "inline styles". Since these are deprecated in the specs and also difficult to maintain due to duplication, Sigil (actually embedded HTML Tidy) pulls them out into separate CSS classes with these sgc-# names. The document renders the same.
Sigil basically doesn't touch separate CSS files at all. It's just these inline styles in the XHTML itself that are pulled into a <style> tag (again, it renders the same, this is just easier to maintain and also conforms to the spec). For the epubcheck errors you'll have to post the epub file. Can't help you blind. |
Advert | |
|
05-20-2010, 12:10 PM | #3 |
Junior Member
Posts: 2
Karma: 10
Join Date: May 2010
Device: iPad
|
CSS external sheets
Thanks for your help. I have incorporated my "quote indent italic" style into the external CSS and the inline styles are no longer generated. The ebubcheck problem was solved as well.
|
05-27-2010, 03:52 PM | #4 | ||
Reader
Posts: 519
Karma: 24612
Join Date: Aug 2009
Location: Utrecht, NL
Device: Kobo Aura 2, iPhone, iPad
|
Quote:
Quote:
This happens in any XHTML file where I do this. I would prefer if Sigil would put these styles in a separate css file, common to all XHTML files, so that global editing of the style becomes easier. |
||
05-27-2010, 05:39 PM | #5 | |
Created Sigil, FlightCrew
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
Quote:
Styles applied through a "style" element (like what you posted) are not inline styles. That would be too invasive and also just wouldn't work right. The global CSS stylesheet would grow like crazy and would have to be automatically rewritten as styles are reused/modified in other files. That would mean that any changes you made by hand to that CSS would not necessarily stay that way. it would also involve making massive changes to HTML Tidy. |
|
Advert | |
|
Tags |
css, epubcheck, italic, sigil, style |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Menu Styles | shinken | Sigil | 1 | 08-27-2010 06:07 AM |
Copying Styles | Johnmuzy | Sigil | 2 | 06-17-2010 12:32 PM |
<hr /> styles | trstill | Introduce Yourself | 1 | 05-30-2010 01:57 PM |
Sigil and CSS files | crutledge | Sigil | 6 | 05-20-2010 09:02 AM |
So many styles! | roger64 | Calibre | 3 | 03-21-2010 08:05 AM |