You could actually give the <pre> a class, then make all the css selectors a decentant of the .tmcode class. Might be a nifty thing to have done by default actually.
What about having multiple themed code snippets on the same page? You could add the themes name to each item in the CSS to let them play nicely together
thomas Aylott—subtleGradient—oblivious@subtleGradient.com