Template:Collapsible list: Difference between revisions

Template page
w:c:strategywiki>Najzere
m (update title font size for retarded navframe styles)
m (6 revisions imported)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<div class="NavFrame {{#if:{{{expand|}}}||collapsed}}" style="{{{framestyle|border:none; padding:0;}}}">
<div class="mw-collapsible {{#if:{{{expand|}}}||mw-collapsed}}" style="{{{framestyle|border:none; padding:0}}}">
     <div class="NavHead" style="{{{titlestyle|background:transparent;font-size:12px}}}" align="left}}"><!--
     <div class="mw-collapsible-header" style="{{{titlestyle|background:transparent;font-size:12px;font-weight:bold}}}"><!--
     -->{{{title|List}}}<!--
     -->{{{title|List}}}<!--
  --></div>
  --></div>
     <div class="NavContent" style="{{{liststyle|text-align:left;}}}"><!--
     <div class="mw-collapsible-content" style="{{{liststyle|text-align:left;padding:0}}}"><!--
     -->{{#if:{{{1|}}}  |{{{1|}}}      }}<!--
     -->{{#if:{{{1|}}}  |{{{1|}}}      }}<!--
     -->{{#if:{{{2|}}}  |{{-}}{{{2|}}}  }}<!--
     -->{{#if:{{{2|}}}  |{{-}}{{{2|}}}  }}<!--
Line 57: Line 57:
</div><noinclude>
</div><noinclude>
{{Documentation}}
{{Documentation}}
[[Category:Templates|{{PAGENAME}}]]
 
</noinclude>
[[Category:Templates]]</noinclude>

Latest revision as of 18:22, 28 October 2023

List

This page has been transcluded from Template:Collapsible list/Documentation.


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