View Single Post
Old 01-18-2009, 03:00 PM   #2
llasram
Reticulator of Tharn
llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.
 
llasram's Avatar
 
Posts: 618
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
Quote:
Originally Posted by Jellby View Post
I arrived at a not so satisfying solution: Use an "@import" statement at the beginning of the standard .css file (it has to be at the beginning) directing to an auxiliary file and tag the rules in this auxiliary file with "!important", so that they override the rules in the standard one. I could have added a "<link>" in each file's "<head>" instead, but that would mean modifying the file for every chapter.
I didn't scientifically verify it, but when I was hand-creating EPUBs it appeared that ADE rendered books which used CSS @import statements visibly more slowly than just <link/>ing each stylesheet directly from the markup. If you're planning to use @import statements, you may want to confirm whether or not that is in fact the case. (My guess is that it causes an extra trip through through the archive-reading layer, because the renderer doesn't know it needs until it starts to parse the CSS.)
llasram is offline   Reply With Quote