$doc in global StyleSheetExtension

Hi there,

I’m currently trying to setup a wiki-wide StyleSheetExtension (configured as “Use this extension on this wiki”).
The extension will include some conditional logic: Using Velocity, I’d like to change some CSS depending on the wiki page requested (esp. its page name and space).

Unfortunately, $doc seems to always refer to the one wiki page containing the StyleSheetExtension object. I’d need a reference to the actual wiki page being displayed.

Thanks for any suggestions!
Chris