Template:Collapsible list/Documentation: Difference between revisions

Template page
w:c:strategywiki>Najzere
m (→‎Examples: adding missing style)
m (5 revisions imported)
 
(3 intermediate revisions by 3 users not shown)
Line 12: Line 12:
*'''<tt>expand</tt>''': Putting something here will make the list expanded on page load. Default is collapsed.
*'''<tt>expand</tt>''': Putting something here will make the list expanded on page load. Default is collapsed.
*'''<tt>framestyle</tt>''': CSS styling for the entire list container. Default is "border:none; padding:0;".
*'''<tt>framestyle</tt>''': CSS styling for the entire list container. Default is "border:none; padding:0;".
*'''<tt>titlestyle</tt>''': CSS styling for the title element. Default is "background:transparent;".
*'''<tt>titlestyle</tt>''': CSS styling for the title element. Default is "background:transparent;font-size:12px".
*'''<tt>liststyle</tt>''': CSS styling for the list itself. Default is "text-align:left;".
*'''<tt>liststyle</tt>''': CSS styling for the list itself. Default is "text-align:left;".


Line 40: Line 40:


;Within another element
;Within another element
<pre>{{collapsible list|{{us|2009|October 14}}|{{jp|2009|November 15|{{eu|2009|December 4}}|title=Release dates}}</pre>
<pre>{{collapsible list
|[[bulbapedia:Sandshrew|Alolan Sandshrew]]
|[[bulbapedia:Sandslash|Alolan Sandslash]]
|[[bulbapedia:Vulpix|Alolan Vulpix]]
|[[bulbapedia:Ninetails|Alolan Ninetails]]
|[[bulbapedia:Smoochum|Smoochum]]
|[[bulbapedia:Jinx|Jinx]]
|title=TMs}}</pre>


{|{{prettytable|style=width:250px}}
{|{{prettytable|style=width:250px}}
! Example table
! Example table
|-
|-
| {{collapsible list|{{icon|us}} [[October 14]], [[2009]]|{{icon|jp}} [[November 15]], [[2009]]|{{icon|eu}} [[December 4]], [[2009]]|title=Release dates}}
| {{collapsible list
|[[bulbapedia:Sandshrew|Alolan Sandshrew]]
|[[bulbapedia:Sandslash|Alolan Sandslash]]
|[[bulbapedia:Vulpix|Alolan Vulpix]]
|[[bulbapedia:Ninetails|Alolan Ninetails]]
|[[bulbapedia:Smoochum|Smoochum]]
|[[bulbapedia:Jinx|Jinx]]
|title=TMs}}
|}
|}
<noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude>
<noinclude>[[Category:Template documentation]]</noinclude>

Latest revision as of 18:22, 28 October 2023

This template creates a collapsible list with room for up to 50 items.

Parameters[edit source]

Unnamed

These range from 1–50 and don't require a parameter name. For instance {{collapsible list|one|two|three}} will result in:

List
one
two
three
Named parameters

These parameters are all technically optional, but it is suggested that you at least give the title parameter.

  • title: The title of the list. Default is "List".
  • expand: Putting something here will make the list expanded on page load. Default is collapsed.
  • framestyle: CSS styling for the entire list container. Default is "border:none; padding:0;".
  • titlestyle: CSS styling for the title element. Default is "background:transparent;font-size:12px".
  • liststyle: CSS styling for the list itself. Default is "text-align:left;".

Examples[edit source]

Standalone template
{{collapsible list
|one
|two
|three
|title=Example list
|expand=yes
|framestyle=padding:3px;border:1px solid black;
|titlestyle=background-color:pink;padding:2px;text-align:center;
|liststyle=text-align:left;color:blue;margin-left:10px;
}}
Example list
one
two
three


Within another element
{{collapsible list
|[[bulbapedia:Sandshrew|Alolan Sandshrew]]
|[[bulbapedia:Sandslash|Alolan Sandslash]]
|[[bulbapedia:Vulpix|Alolan Vulpix]]
|[[bulbapedia:Ninetails|Alolan Ninetails]]
|[[bulbapedia:Smoochum|Smoochum]]
|[[bulbapedia:Jinx|Jinx]]
|title=TMs}}
Example table