|
|
Line 8: |
Line 8: |
| }}; padding: 1px;" | | }}; padding: 1px;" |
| |- | | |- |
| ! style="background-color: {{{background|{{{bg|#4B4951}}}}}}; font-size:87%; padding:0.2em 0.3em; text-align: {{{{{|safesubst:}}}#if:{{{left|}}}|left|{{{{{|safesubst:}}}#if:{{{center|}}}|center|left}}}}; {{{{{|safesubst:}}}#if:{{{fc|}}}|color: {{{fc}}};|}}" | <div style="display: inline; font-size: 115%;">{{{2|{{{title|{{{reason|{{{header|{{{heading|{{{result|Extended content}}}}}}}}}}}}}}}}}}</div> | | ! style="background-color: {{{background|{{{bg|#4B4951}}}}}}; font-size:87%; padding:0.2em 0.3em; text-align: {{{{{|safesubst:}}}#if:{{{left|}}}|left|{{{{{|safesubst:}}}#if:{{{center|}}}|center|left}}}}; {{{{{|safesubst:}}}#if:{{{fc|}}}|color: {{{fc}}};|}}" | <div style="display: inline; font-size: 115%;">{{{2|{{{title|{{{reason|{{{header|{{{heading|{{{result|Collapsed Content}}}}}}}}}}}}}}}}}}</div> |
| |- | | |- |
| | style="border: solid {{{border2|1px silver}}}; padding: {{{padding|8px}}}; background-color: {{{bg2|#514A49 |}}};" | | | | style="border: solid {{{border2|1px silver}}}; padding: {{{padding|8px}}}; background-color: {{{bg2|#514A49 |}}};" | |
Line 16: |
Line 16: |
| <noinclude> | | <noinclude> |
| == Usage == | | == Usage == |
| | The typical use of the '''Collapse''' template is so that text can be hidden from view until it the box is expanded. There also exist a few options to modify the base box that is utilized by the Dark Brotherhood wiki. |
| | |
| === <code>bg</code> parameter === | | === <code>bg</code> parameter === |
|
| |
|
Line 54: |
Line 56: |
| <code><nowiki>{{</nowiki>Collapse|1=<var>Discussion text to be put into box.</var>|float=none|width=30em<nowiki>}}</nowiki></code> creates the following: | | <code><nowiki>{{</nowiki>Collapse|1=<var>Discussion text to be put into box.</var>|float=none|width=30em<nowiki>}}</nowiki></code> creates the following: |
|
| |
|
| {{Collapse|1=Discussion text to be put into box.|float=none|width=30em}} | | {{Collapse|1=Discussion text to be put into box.|float=none|width=30em}}<noinclude> |
| | |
| ===The <code>expand</code> parameter===
| |
| Simply add {{para|expand|yes}} to have the box show up in expanded form with a "hide" link, instead of collapsed form with a "show" link. Other options: {{para|expand|}} <code>yes, y, expand, expanded, uncollapse, uncollapsed</code>. Note: {{para|expand|no}} will fold the box (default).
| |
| | |
| ===The <code>clear</code> parameter===
| |
| In some situations you may not want the default <code>clear: both;</code> CSS to apply, which puts the collapse box below any left- or right-floated content within the same HTML block. In this case, you can use {{para|clear|none}}, {{para|clear|right}}, or {{para|clear|left}}, as needed.
| |
| | |
| ===When content includes tables===
| |
| This template frequently breaks when used around content that consists of or includes [[Help:Table|wikitables]]. Such content can be made collapsible by using the {{tlx|collapse top}} and {{tlx|collapse bottom}} templates instead of {{tlx|collapse}}.
| |
| | |
| If you want to collapse only the table and not other content, you can do this using wikitable parameters. See the [[Help:Collapsing#Collapsing tables by default|Collapsing tables]] guide for help.
| |
Revision as of 23:36, 5 August 2020
|
This high-risk template has been protected from editing to prevent vandalism.
Please discuss changes on the talk page. You may use editprotected on the talk page to ask for an administrator to make an edit for you.
|
Collapsed Content
|
{{{1}}}
|
Usage
The typical use of the Collapse template is so that text can be hidden from view until it the box is expanded. There also exist a few options to modify the base box that is utilized by the Dark Brotherhood wiki.
bg
parameter
The bg
parameter is optional parameter that allows the user to change the background color. optional. It changes the background color. Use Web color values (e.g. #F0F2F5
).
- Example
{{Collapse|1=Discussion text to be put into box.|bg=#F0F2F5}}
creates:
Collapsed Content
|
Discussion text to be put into box.
|
The padding
parameter
The padding
parameter adjusts the amount of cell padding (defaults to 8px
):
{{Collapse|1=Discussion text to be put into box.|padding=20px}}
creates the following (expand the box to see the border padding effect):
Collapsed Content
|
Discussion text to be put into box.
|
The float
parameter
The float
parameter allows the collapsed content to float to the left, right, or center of the page (defaults to none
with width = 100%
):
{{Collapse|1=Discussion text to be put into box.|float=center}}
creates the following:
Collapsed Content
|
Discussion text to be put into box.
|
{{Collapse|1=Discussion text to be put into box.|float=center|width=30em}}
creates the following:
Collapsed Content
|
Discussion text to be put into box.
|
{{Collapse|1=Discussion text to be put into box.|float=left|width=30em}}
creates the following:
Collapsed Content
|
Discussion text to be put into box.
|
{{Collapse|1=Discussion text to be put into box.|float=right|width=30em}}
creates the following:
Collapsed Content
|
Discussion text to be put into box.
|
{{Collapse|1=Discussion text to be put into box.|float=none|width=30em}}
creates the following:
Collapsed Content
|
Discussion text to be put into box.
|