Template:Spoiler: Difference between revisions

From Step Mods | Change The Game
No edit summary
m (Reverted edits by TechAngel85 (talk) to last revision by Z929669)
Line 1: Line 1:
<includeonly><div class="mw-collapsible mw-collapsed"><div class="mw-collapsible-toggle" style="float:none; cursor:pointer; color:#8DA9C0; display:{{#ifeq:{{{h2}}}|1|initial|inline-block}};">&#10133; {{{1|Click to show contents...}}}</div><div class="mw-collapsible-content">{{{2|}}}</div></div></includeonly><noinclude>__NOTOC__ [[Category:Layout Templates]]
<includeonly><div class="mw-collapsible mw-collapsed"><div class="mw-collapsible-toggle" style="float:none; cursor:pointer; color:#8DA9C0; display:{{#ifeq:{{{h2}}}|1|initial|inline-block}};">&#10133; {{{shown}}}</div><div class="mw-collapsible-content">{{{hidden}}}</div></div></includeonly><noinclude>__NOTOC__ [[Category:Layout Templates]]


==Purpose & Usage==
==Purpose & Usage==

Revision as of 05:28, November 16, 2020


Purpose & Usage

This template allows text to be clicked like a spoiler to show hidden text immediately underneath it.

Parameters

  • parameter shown is the text clicked to show the hidden content
  • parameter hidden is the hidden content
  • parameter h2 if set to 1 will make the shown text have the initial display property (useful for the header 2 level, since it is underlined).

Examples

Code:

{{Spoiler|shown=Click Me!|hidden=Where did this come from?}}

Result:

➕ Click Me!
Where did this come from?

Known Issues

  • Incompatible with CSS extension

See Also

No similar templates known.