View Single Post
Old 07-03-2012, 09:35 AM   #201
kiwidude
Calibre Plugins Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,635
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Ahhh... *less* than zero is the trick, thanks, that now makes sense.

I think this plugin should follow along those same lines then. If your defaults are set to less than zero, then it will do its *current* behaviour of omitting attributes from the style, and with my fixes propagate that to removing the style if it has no other attribution, then the css file if it has no other styles. So with the new version JSWolf should just be able to run the plugin again against your epubs and have all the stuff you don't like disappear. Note however if the @page or body style has other attributes set on it (like padding for instance) it will stay in the css file with just those attributes, just like it does today.

If you set your calibre margin defaults to either zero or a positive value, then the plugin will *always* write out that value, which is different to how it behaves today but inline with what a calibre conversion does.

Hopefully that is the right middle ground on this.
kiwidude is offline   Reply With Quote