Besides using a template for adding a category to a page I would like to add the very same category name as a class to the page's body tag like so:
$('body').addClass('myCategory')
This would enable category based styling using CSS as suggested at http://www.mediawiki.org/wiki/Thread:Project:Support_desk/Css_for_categories
Is this a feasible option?
CSS-based category styling seems (to me) not scalable. On a large wiki, articles may be in 5-10 categories each easily. Even if you have a precedence among the categories for styling, I think it would produce an inconsistent user experience.
What business problem are you really trying to solve here? Maybe Category CSS isn't the only solution.
DanB
mediawiki-l@lists.wikimedia.org