Jump to content

Template:Dark mode invert/doc

From Wikibooks, open books for an open world

{{Dark mode invert}} inverts the color of the contents its given when dark mode is enabled. It uses skin-invert and skin-invert-image.

{{Dark mode invert|<content>}}

Parameters

[edit source]
  • |1= - The content to invert when dark mode is enabled.
  • |block= - Set to yes to wrap the output with <div>...</div> instead of a <span>...</span>.
  • |image= - Set to yes to only invert images.

Example

[edit source]
<span style="color:black;">{{Dark mode invert|I invert}} I do not</span>

I invert I do not

{{Dark mode invert|[[File:Rating-Christgau-dud.svg|20px]]}}

Image with caption

[edit source]
{{Dark mode invert|[[File:Rating-Christgau-dud.svg|frame|Boom]]}}
Boom
{{Dark mode invert|image=y|[[File:Rating-Christgau-dud.svg|frame|Boom]]}}
Boom
{{Dark mode invert|block=y|1=<div style="background:darkred;color:white;padding:4px;">I am block</div>}}
I am block