On Sat, Mar 6, 2010 at 8:25 PM, Jim Tittsler <[email protected]> wrote: > On 07/03/10 07:32, Łukasz Garczewski wrote: >> On Sat, Mar 6, 2010 at 12:51 AM, Jim Tittsler <[email protected]> wrote: >>> How can I #if test the user's current skin name in a template? I have a >>> template that I would like to include different images based on the >>> user's skin. >> >> Use CSS instead. Seriously. > > How is that best done? Does someone with appropriate rights have to add > to one of the global CSS files or is there a way to embed the CSS in a > template/page?
Well, normally you could use the style attribute to add in-line styling. But since you want per-skin differentiation, what you should do is: * add a class to the element you want to style * add basic, not skin-dependent styles for the specified class to MediaWiki:Common.css * add per-skin styles for the specified class to MediaWiki:Monobook.css, for example -- generally MediaWiki:<skinname>.css should work, but might not with very old/custom skins If the usual way doesn't work for your skin, you can always try to override based on, say, the presence of a specific parent element. Good luck. :) -- Lucas 'TOR' Garczewski Wikia Tech Team _______________________________________________ MediaWiki-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
