Template:Collapse: Difference between revisions
Appearance
imported>Pathoschild create page |
imported>Margotbean No edit summary |
||
| (4 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
<includeonly> | <includeonly>{| class="mw-collapsible mw-collapsed" style="{{{css|}}}" | ||
{| class="mw-collapsible mw-collapsed" | | style="text-align: left; font-weight: bold;" | {{{1|Details}}} | ||
|- | |- | ||
| {{{content}}} | | {{{content|}}} | ||
|}</includeonly><noinclude>{{{{FULLPAGENAME}}/doc}}</noinclude> | |}</includeonly><noinclude>{{{{FULLPAGENAME}}/doc}}</noinclude> | ||
Latest revision as of 15:44, 5 July 2026
Description
This template creates a collapsible box for extended content. This should be used sparingly, since it reduces readability.
This template may also be used to hide "spoiler" content.
Basic usage
Default usage
{{collapse
|content = <syntaxhighlight lang="c#">
Lots of code here
</syntaxhighlight>
}}
| Details |
Lots of code here
|
Named section
{{collapse
|code
|content = <syntaxhighlight lang="c#">
Lots of code here
</syntaxhighlight>
}}
| code |
Lots of code here
|
Collapse spoilers
{{collapse
|Solution
|content=Solve the puzzle by performing action x during a full moon on the 12th day of any season.
}}
| Solution |
| Solve the puzzle by performing action x during a full moon on the 12th day of any season. |
Advanced usage
Custom styles
{{collapse
|content = Some example text here.
|css = border: 1px solid red; background: #FCC;
}}
| Details |
| Some example text here. |