View Single Post
Old 02-18-2010, 12:29 PM   #6
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: 45,418
Karma: 27757236
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Here is how CSS is merged:

All css is extracted from teh input document. Extra css is added to the extracted css. Various manipulation is done on the css for font size rescaling, justification, margins etc.

The modified css is written back out into the output file in the form of class based selectors. What CSS overrides other css depends on the priority of the selectors used. CSS has complex rules governing this, which I dont have the time to go into here.
kovidgoyal is offline   Reply With Quote