View Single Post
Old 08-05-2009, 04:45 PM   #3
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: 25,442
Karma: 4961459
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Welcome to my world The way calibre handles this is it "flattens" the css. i.e. it computes the style applying to every element. Once that's done, it's relatively easy to reset the computed values to some defaults.

Of course, I doubt this approach is suitable for Sigil since you don't want to mess with the user specified CSS structure. But perhaps if the user asks you to do this, you can warn them that it will involve flattening the css and then do it.
kovidgoyal is offline   Reply With Quote