Difference between revisions of "Collapsible"
Line 1: | Line 1: | ||
<includeonly>{</includeonly><includeonly>{{!}} style="background-color:#1d1d1d; width: {{#if: {{{width|}}}|{{{width}}}|70}}%;" | <includeonly>{</includeonly><includeonly>{{!}} style="background-color:#1d1d1d; width: {{#if: {{{width|}}}|{{{width}}}|70}}%;" | ||
{{!}} | {{!}} | ||
− | ==={{{header|}}}=== | + | {{#if: {{{header|}}}|==={{{header|}}}===}} |
{{{1|}}} | {{{1|}}} | ||
<div class="mw-collapsible mw-{{#ifeq:{{{collapsed|}}}|false|expanded|collapsed}}> | <div class="mw-collapsible mw-{{#ifeq:{{{collapsed|}}}|false|expanded|collapsed}}> | ||
Line 10: | Line 10: | ||
Creates a box with a collapsible segment. | Creates a box with a collapsible segment. | ||
;|width | ;|width | ||
− | Sets the box width to a percentage of the site width. | + | Sets the box width to a percentage of the site width. Defaults to 70. |
;|header | ;|header | ||
− | + | When set, creates a level 3 header within the box, but outside the collapsible segment. | |
;|collapsed | ;|collapsed | ||
Starts in the expanded state when set to '''false'''. Defaults to the collapsed state when not set or set to any other value, including '''true'''. | Starts in the expanded state when set to '''false'''. Defaults to the collapsed state when not set or set to any other value, including '''true'''. |
Revision as of 16:32, 27 February 2022
Creates a box with a collapsible segment.
- |width
Sets the box width to a percentage of the site width. Defaults to 70.
- |header
When set, creates a level 3 header within the box, but outside the collapsible segment.
- |collapsed
Starts in the expanded state when set to false. Defaults to the collapsed state when not set or set to any other value, including true.
- |1
Holds text outside the collapsible segment, this text will be visible in both expanded and collapsed states
- |2
holds the text within the collapsible segment. This text will be hidden when the segment is collapsed. Headers in this segment will not work from the Table of Contents when the section is collapsed.
Get MetaBattle Premium
Enjoy an ad-free experience & support the website, for less than $1 per month! Upgrade to Premium
Enjoy an ad-free experience & support the website, for less than $1 per month! Upgrade to Premium