Template:Collapse: Difference between revisions

From Space Station 14 Wiki
(expand collapse button positioning customization)
No edit summary
Line 1: Line 1:
<includeonly><!--
<includeonly><!--
# template styles
# template styles
--><templatestyles src="/styles.css" /><!--
--><templatestyles src="Template:Collapse/styles.css" /><!--


# template
# template
Line 8: Line 8:
     mw-collapsible  
     mw-collapsible  
     {{#if: {{{collapsed|1}}}|mw-collapsed}}
     {{#if: {{{collapsed|1}}}|mw-collapsed}}
     expand-collapse-button-float-{{{button float|left}}}"
     expand-collapse-button-float-{{{button float|none}}}"
   style="{{{style|}}}">{{{1}}}</div></includeonly><noinclude>
   style="{{{style|}}}">{{{1}}}</div></includeonly><noinclude>
{{documentation}}
{{documentation}}
Line 43: Line 43:
"none"
"none"
],
],
"default": "left",
"default": "none",
"suggested": true
"suggested": true
}
}
},
},
"description": "A template for creating collapsible blocks. By default, takes up the entire width, placing the \"Expand/Collapse\" button to the right.",
"description": "A template for creating collapsible blocks.",
"paramOrder": [
"paramOrder": [
"1",
"1",

Revision as of 15:48, 24 June 2024

Template documentation
view or edit this documentation about template documentation

  • As a separate string of text {{Collapse|text inside!!}}:
text inside!!
  • Inside a string of text Lorem ipsum {{Collapse|text inside!!}} dolor sit amet:
Lorem ipsum
text inside!!
dolor sit amet

A template for creating collapsible blocks.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Content1

Content inside the box.

Stringrequired
Is collapsed by default?collapsed

no description

Default
1
Booleansuggested
Any custom stylingstyle

no description

Example
width: 10rem;
Stringsuggested
Button floatbutton float

Placement for the "Expand/Collapse" button using float.

Suggested values
left right none
Default
none
Stringsuggested