User:Rigel Kent/Wikiamobile hacks

Wikiamobile only
Add the  property to an element to hide the element in skins other than Wikiamobile.

 /* In MediaWiki:Wikia.css and MediaWiki:Monobook.css */ .wikiamobile-only { display:none; }

This does not display in Wikia or Monobook skin.

or



This does not display in Wikia or Monobook skin.

Other skins only
Add the  class to an element to hide the element, as with , in Wikiamobile skin.

 This does not display in Wikiamobile skin.

Center
Add the  class to a block level element to center text and take up all available width, as with , in Wikiamobile skin.

 This block is full width with centered text in Wikiamobile skin.

Add the  class to a block level element to center text and take up all available width, as with , in skins other than Wikiamobile. Note that this also adds  to child elements.

 This block is full width with centered text in Wikia and Monobook skins.

This child element has auto left and right margins in Wikia and Monobook skins.

Add the  property to a block level element to center the block in skins other than Wikiamobile.

 /* In MediaWiki:Wikia.css and MediaWiki:Monobook.css */ .align-center { text-align:center; }

This text is centered in Wikia and Monobook skins. or  This text is centered in Wikia and Monobook skins.

Use the deprecated  element to center a block in any skin.

 This text is centered in all skins.

Bold
Add the  property to an element to bold text in skins other than Wikiamobile.

 /* In MediaWiki:Wikia.css and MediaWiki:Monobook.css */ .bold { font-weight:bold; }

This text is bold in Wikia and Monobook skins. or  This text is bold in Wikia and Monobook skins.

Use triple apostrophes or the  or   elements to bold text in any skin.

 This text is bold in all skins.

 This text is bold in all skins. 

This text is bold in all skins.

Italic
Use the  element to italicize text in Wikiamobile skin.

 This text is italic in Wikiamobile skin.

Add the  property to an element to italicize text in skins other than Wikiamobile.

 /* In MediaWiki:Wikia.css and MediaWiki:Monobook.css */ .italic { font-style:italic; }

This text is italic in Wikia and Monobook skins. or  This text is italic in Wikia and Monobook skins.

Use the  element to italicize text in skins other than Wikiamobile.

<pre style="white-space:pre-wrap;"> This text is italic in Wikia and Monobook skins.

Use double apostrophes or the  element to italicize text in any skin.

<pre style="white-space:pre-wrap;"> This text is italic in all skins.

<i> This text is italic in all skins. </i>

General hacks
Add inline styles using the  attribute to apply CSS properties to skins other than Wikiamobile.

<pre style="white-space:pre-wrap;"> This text is red in Wikia and Monobook skins.