![]() |
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! |
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. |
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.
|
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. |
Quote:
Styles applied through a "style" element (like what you posted) are not inline styles. Quote:
|
| All times are GMT -4. The time now is 06:01 PM. |
Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.