Template:Show: Difference between revisions
Content deleted Content added
No edit summary |
No edit summary Tag: Reverted |
||
Line 2:
data-expandtext="{{{expandtext|more ▾}}}"
data-collapsetext="{{{collapsetext|less ▴}}}"
style="{{#ifeq:{{{inline|}}}|yes|display:inline;}}{{#ifeq:{{{compact|}}}|yes|display:inline-block; vertical-align:
<{{#ifeq:{{{inline|}}}|yes|span|div}} class="mw-collapsible-content" style="{{#ifeq:{{{inline|}}}|yes|display:inline;}}">
{{{text|}}}</{{#ifeq:{{{inline|}}}|yes|span|div}}>
Line 15:
== Compact Usage ==
This version prevents the "
<pre>
{{show
Line 21:
|text=This text is short and the button stays close and aligned.
}}
</pre>
Line 43 ⟶ 27:
* '''expandtext''': The text for the "show" link (Defaults to "more ▾").
* '''collapsetext''': The text for the "hide" link (Defaults to "less ▴").
* '''inline''': Set to "yes" to use span tags
* '''compact''': Set to "yes" to keep the toggle link next to the text
* '''state''': Set to "expanded" to have the text visible on page load.
* '''style''': Pass additional CSS styles directly.
== Required CSS ==
<pre>
.mw-compact-toggle .mw-collapsible-toggle {
float: none !important;
display: inline-block !important;
margin-left: 0.5em;
vertical-align:
}
</pre>
| |||