Template:Collapse top: Difference between revisions
Jump to navigation
Jump to search
>GKPlight mNo edit summary |
>GKPlight m (remove a bug) |
||
Line 1: | Line 1: | ||
<div class="mw-customtoggle- | <div class="mw-customtoggle-{{{2|CollapsibleB}}}" style="cursor:pointer; position:relative; width:{{{width|100}}}%; background: #332f24; display:inline-block; padding:0px 0px; line-height:28px; color:#dfcf99; font-size:16px; font-weight:bold"><div align="{{{align|center}}}"> {{{1|<noinclude>Extended content</noinclude>}}} <span style="position:absolute;left:5px;">▾</span> | ||
<span style="position:absolute;right:5px;"><span style="font-size:14px;font-weight:400">[Expand]</span> ▾</span></div></div> | <span style="position:absolute;right:5px;"><span style="font-size:14px;font-weight:400">[Expand]</span> ▾</span></div></div> | ||
<div id="mw-customcollapsible- | <div id="mw-customcollapsible-{{{2|CollapsibleB}}}" class="mw-collapsible {{#if:{{{expand|}}}||mw-collapsed}}" style="display:flow-root;"> | ||
<div class="mw-collapsible-content" style="border: 1px solid #332f24; padding:{{{padding-content|0 1em}}}; background:{{{bg-content|transparent}}}; text-align:left; box-sizing:content-box;"> | <div class="mw-collapsible-content" style="border: 1px solid #332f24; padding:{{{padding-content|0 1em}}}; background:{{{bg-content|transparent}}}; text-align:left; box-sizing:content-box;"> | ||
<noinclude> | <noinclude> |
Revision as of 22:23, 6 February 2021
Extended content ▾
[Expand] ▾
Lorem ipsum
The {{collapse top}}
template (or {{cot}}
), and its paired template {{collapse bottom}}
(or {{cob}}
), are used for placing a collapse box around a talk page discussion, especially when the content contains complex wikimarkup such as tables. For very simple content, the one-piece template {{collapse}}
can be used instead.
Usage
Place {{collapse top}}
(or {{cot}}
), and {{collapse bottom}}
(or {{cob}}
), around the text to be collapsed. For example:
{{collapse top|This is the title text|OptionalIDToMakeThatEachColapsibleCollapseAndExpandSeparately}} Sample contents text {{collapse bottom}}
produces:
This is the title text ▾
[Expand] ▾
Sample contents text
The above documentation is transcluded from Template:Collapse top/doc.
Editors can experiment in this template's sandbox and testcases pages.
Please add categories to the /doc subpage. Subpages of this template.
Editors can experiment in this template's sandbox and testcases pages.
Please add categories to the /doc subpage. Subpages of this template.