Thread:Project:Support desk/How to customize auto-numbering of TOCs/reply (6)

I don't understand what you mean by "grab css". You can certainly add more css on the php side (See resource loader docs for how to add custom css as part of an extension).

If you mean read the current css and do something based on that - In theory you can retrieve the current contents of MediaWiki:Common.css on the php side (just like you can do for any other message), parse the css, and see what's there, but that would be a large amount of work (to write your own css parser), not to mention css can come from other places too, so I really do not reccomend doing that, if that is what you are planning. A better way to be able to customize would be to define a new system message, get its contents with wfMsgForContent, and do stuff based on its contents (or rewrite the toc to use &lt;li&gt; which can be styled by css).

[As an aside, note that making custom patches to mediawiki is not recomended/supported yadda yadda standard disclaimer... Although in this case there's really no hooks for an extension to use]