Quote:
Originally Posted by retiredbiker
But I keep finding old short stories from early mystery and sci-fi magazines that have all in-line styling and no CSS files--the only way I've found to deal with those is to convert, as it gets rid of the in-line stuff and creates a CSS file. The originals can be so dense with code it's migraine time to try and read it. No idea how else to do that.
|
The
Editor Chains plugin has an action (
Inline styles to CSS) that can transform inline styles to CSS. This process should be straightforward for books that contains only inline styles, as in your use case.
Note however, that in books that have both inline styles and CSS sheets (or style tags), this can lead to problems with formatting, because converting can clash with CSS rules of precedence, specificity .... etc which can make CSS cascade run different before and after conversion.
So to guard against this problem, the plugin will calculate the effective style for each element before and after the conversion to CSS, and if they are not the same for every element, it will not go ahead with the conversion (there is an option to partially override this for only for elements that won't be affected).
Quote:
Originally Posted by retiredbiker
I have come to agree about not converting most of the time
|
For people who are averse to conversion, the plugin can also automate a lot of things without changing the epub code, this includes things like: transform html, transform css, remove unused CSS, beautify, embed, subset, smarten .... etc.
You can also run your automation on multiple books by using the Action Chains plugin together with Editor Chains.