Template:Collapse/doc
32px | This template uses TemplateStyles: |
This is a documentation subpage for . It contains usage information, categories and other content that is not part of the original template page. |
This template creates a collapsible box.
The template automatically sets the following categories:
- Template:Red link, if parameter
1
is empty.
Usage
{{collapse |title= |1= }}
Template parameters
Parameter | Description | Default | Status | |
---|---|---|---|---|
title | title | The always visible title of the collapsed box | {{PAGENAME}} | suggested |
1 | content | Hidden content of the box. If it includes an equal sign, be sure to use the {{collapsed|1=content}} form or replace the equal signs with = . | empty | required |
expand | expand | Whether the box should be expanded (not collapsed) by default (anything apart from “no” means yes) | no | optional |
header-c | header background color | CSS color code or name of the background color of the header | #f0f2f5 | optional |
border-c | border color | CSS color code or name of the outer border of the whole box | #aaa | optional |
background-c | background color | CSS color code or name of the background of the whole box | #fff | optional |
border-w | border width | CSS length of the width of the outer border of the whole box | 1px | optional |
border-s | border style | CSS border style of the outer border of the whole box | solid | optional |
font-size | general font size | CSS font size of the header and body text (relative values are relative to the context of the box) | 88% | optional |
header-fs | header font size | CSS font size of the header text; overrides the general font size (relative values are still relative to the context of the box, not the general font size) | empty | optional |
header-fc | header foreground color | CSS color code or name of the foreground (text) color of the header | #000 | optional |
width | width | CSS length of the width of the box | 100% | optional |
align | body text align | Text alignment of the content: “left”, “right” or “center”. By default it inherits the context’s alignment | empty | optional |
header-align | header text align | Text alignment of the header: “left”, “right” or “center”. Explicit “center” enlarges left padding of the title | center | optional |
clear | clear | The side to clear on (i.e. prevent things floated to that side of the page from overlapping with the collapse box): “left”, “right”, “both” or “none” | both | optional |
margin | margin | CSS margin size of the whole box | auto | optional |
color | body foreground color | CSS color code or name of the foreground (text) color of the body | #222 | optional |
class | CSS class | Additional CSS classes for the whole box | empty | optional |
<templatedata>JSON</templatedata> ./. {{TemplateBox}}
TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard. Existing template documentation Newly created template documentation and imports Wikipedia's help about TemplateData • Commons-specific information This template creates a collapsible box.
|
Additional information
The template is intended to be used in the following namespaces: all namespaces
The template is intended to be used by the following user groups: all users
⧼Seealso⧽
- {{collapse top}}
- {{collapse bottom}}
Localization
This template is not intended to be localized.