Psuvillager (talk | contribs) (testing) |
Psuvillager (talk | contribs) (Fixed it) |
||
Line 1: | Line 1: | ||
<noinclude> |
|||
⚫ | |||
{{{2}}} |
|||
This template makes a collapsible section with basic formatting, including an optional title. It: |
|||
⚫ | |||
* Leaves the title (if any) visible when the content is collapsed |
|||
* Uses the "mw-collapsible" components explicitly to keep the toggle button from drifting into any subsequent text (<span style="font-family:monospace">mw-collapsible-toggle-placeholder</span> and particularly <span style="font-family:monospace">mw-collapsible-content</span>.) |
|||
<br /><br /> |
|||
Write: <code><nowiki>{{Collapsible Section|my content|my title}}</nowiki></code><br /> |
|||
to get: |
|||
<div style="border: 1px solid grey"> |
|||
{{Collapsible Section|my content|my title}} |
|||
</div> |
|||
<br /><br /> |
|||
When this description was last updated, the markup looked like this: |
|||
<code> |
|||
<nowiki><div class="mw-collapsible"></nowiki><br /> |
|||
<nowiki><span mw-collapsible-toggle-placeholder></span></nowiki><br /> |
|||
<nowiki>{{{2}}}</nowiki><br /> |
|||
<nowiki><div class="mw-collapsible-content">{{{1}}}</div></nowiki><br /> |
|||
<nowiki></div></nowiki></code> |
|||
</noinclude> |
|||
⚫ | |||
⚫ | |||
<includeonly>{{{2}}}</includeonly> |
|||
<div class="mw-collapsible-content"> |
<div class="mw-collapsible-content"> |
||
{{{1}}} |
<includeonly>{{{1}}}</includeonly> |
||
</div> |
</div> |
||
</div> |
</div> |
Revision as of 02:22, 18 January 2025
This template makes a collapsible section with basic formatting, including an optional title. It:
- Leaves the title (if any) visible when the content is collapsed
- Uses the "mw-collapsible" components explicitly to keep the toggle button from drifting into any subsequent text (mw-collapsible-toggle-placeholder and particularly mw-collapsible-content.)
Write: {{Collapsible Section|my content|my title}}
to get:
my title
my content
When this description was last updated, the markup looked like this:
<div class="mw-collapsible">
<span mw-collapsible-toggle-placeholder></span>
{{{2}}}
<div class="mw-collapsible-content">{{{1}}}</div>
</div>