|02-12-2013, 09:16 PM||#1|
Generally Awesome Person
Join Date: Jan 2013
Location: San Francisco Bay Area
Device: Kindle Paperwhite 2
CSS conversion from a plugin
I'm trying to figure out how I can set a CSS rule (specifically, margin:0px) while my plugin is processing books, but I'm not sure how to do it. Some files reference a single CSS file, some reference multiple CSS files, some have one or more CSS files and their own style tag...
Is there a (relatively) easy way through calibre to find any margin declarations and change them to 0, or set margin:0px if there is no margin rules?
|02-12-2013, 11:11 PM||#2|
creator of calibre
Join Date: Oct 2006
Location: Mumbai, India
No, there isn't. You have to parse all the css files, all the html files, connect all style rules to their elements, go through all style tags and style attributes, update style rules as per css precedence and then finally change things. Why do you think the calibre conversion process is so involved.
|Thread Tools||Search this Thread|
|Thread||Thread Starter||Forum||Replies||Last Post|
|html to epub conversion with extra CSS||oilizer||Conversion||4||10-23-2011 08:51 AM|
|add css file to epub conversion||VICTORSJG||Calibre||0||09-21-2011 07:38 AM|
|AZW Conversion Output Plugin||tylau0||Plugins||59||08-14-2011 10:36 PM|
|EPub conversion stylesheet.css problem||nycaleksey||Calibre||1||03-25-2010 11:42 PM|
|Additional CSS for conversion||LARdT||Calibre||6||02-18-2010 07:52 PM|