Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Reply
 
Thread Tools Search this Thread
Old 02-12-2013, 10:16 PM   #1
jgoguen
Generally Awesome Person
jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.
 
Posts: 658
Karma: 2018502
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?
jgoguen is offline   Reply With Quote
Old 02-13-2013, 12:11 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,350
Karma: 5382313
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
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.
kovidgoyal is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
html to epub conversion with extra CSS oilizer Conversion 4 10-23-2011 09:51 AM
add css file to epub conversion VICTORSJG Calibre 0 09-21-2011 08:38 AM
AZW Conversion Output Plugin tylau0 Plugins 59 08-14-2011 11:36 PM
EPub conversion stylesheet.css problem nycaleksey Calibre 1 03-26-2010 12:42 AM
Additional CSS for conversion LARdT Calibre 6 02-18-2010 08:52 PM


All times are GMT -4. The time now is 07:26 PM.


MobileRead.com is a privately owned, operated and funded community.