Template:Collapsible list code style: Difference between revisions

Template page
m (test 2)
m (less test more force)
Line 1: Line 1:
|framestyle=display:inline-block;
<div class="mw-collapsible {{#if:{{{expand|}}}||mw-collapsed}}" style="display:inline-block;">
|titlestyle=overflow:auto;padding-right:1em;
    <div class="mw-collapsible-header" style="overflow:auto;padding-right:1em;"><!--
|liststyle=padding:1em;margin:1em;display:inline-block;border:1px solid #ddd;background-color:#f9f9f9;font-family:monospace,Courier;
    -->{{{title|List}}}<!--
--></div>
    <div class="mw-collapsible-content" style="padding:1em;margin:1em;display:inline-block;border:1px solid #ddd;background-color:#f9f9f9;font-family:monospace,Courier;"><!--
    -->{{#if:{{{1|}}}  |{{{1|}}}      }}<!--
    -->{{#if:{{{2|}}}  |{{-}}{{{2|}}}  }}<!--
    -->{{#if:{{{3|}}}  |{{-}}{{{3|}}}  }}<!--
    -->{{#if:{{{4|}}}  |{{-}}{{{4|}}}  }}<!--
    -->{{#if:{{{5|}}}  |{{-}}{{{5|}}}  }}<!--
    -->{{#if:{{{6|}}}  |{{-}}{{{6|}}}  }}<!--
    -->{{#if:{{{7|}}}  |{{-}}{{{7|}}}  }}<!--
    -->{{#if:{{{8|}}}  |{{-}}{{{8|}}}  }}<!--
    -->{{#if:{{{9|}}}  |{{-}}{{{9|}}}  }}<!--
    -->{{#if:{{{10|}}} |{{-}}{{{10|}}} }}<!--
    -->{{#if:{{{11|}}} |{{-}}{{{11|}}} }}<!--
    -->{{#if:{{{12|}}} |{{-}}{{{12|}}} }}<!--
    -->{{#if:{{{13|}}} |{{-}}{{{13|}}} }}<!--
    -->{{#if:{{{14|}}} |{{-}}{{{14|}}} }}<!--
    -->{{#if:{{{15|}}} |{{-}}{{{15|}}} }}<!--
    -->{{#if:{{{16|}}} |{{-}}{{{16|}}} }}<!--
    -->{{#if:{{{17|}}} |{{-}}{{{17|}}} }}<!--
    -->{{#if:{{{18|}}} |{{-}}{{{18|}}} }}<!--
    -->{{#if:{{{19|}}} |{{-}}{{{19|}}} }}<!--
    -->{{#if:{{{20|}}} |{{-}}{{{20|}}} }}<!--
    -->{{#if:{{{21|}}} |{{-}}{{{21|}}} }}<!--
    -->{{#if:{{{22|}}} |{{-}}{{{22|}}} }}<!--
    -->{{#if:{{{23|}}} |{{-}}{{{23|}}} }}<!--
    -->{{#if:{{{24|}}} |{{-}}{{{24|}}} }}<!--
    -->{{#if:{{{25|}}} |{{-}}{{{25|}}} }}<!--
    -->{{#if:{{{26|}}} |{{-}}{{{26|}}} }}<!--
    -->{{#if:{{{27|}}} |{{-}}{{{27|}}} }}<!--
    -->{{#if:{{{28|}}} |{{-}}{{{28|}}} }}<!--
    -->{{#if:{{{29|}}} |{{-}}{{{29|}}} }}<!--
    -->{{#if:{{{30|}}} |{{-}}{{{30|}}} }}<!--
    -->{{#if:{{{31|}}} |{{-}}{{{31|}}} }}<!--
    -->{{#if:{{{32|}}} |{{-}}{{{32|}}} }}<!--
    -->{{#if:{{{33|}}} |{{-}}{{{33|}}} }}<!--
    -->{{#if:{{{34|}}} |{{-}}{{{34|}}} }}<!--
    -->{{#if:{{{35|}}} |{{-}}{{{35|}}} }}<!--
    -->{{#if:{{{36|}}} |{{-}}{{{36|}}} }}<!--
    -->{{#if:{{{37|}}} |{{-}}{{{37|}}} }}<!--
    -->{{#if:{{{38|}}} |{{-}}{{{38|}}} }}<!--
    -->{{#if:{{{39|}}} |{{-}}{{{39|}}} }}<!--
    -->{{#if:{{{40|}}} |{{-}}{{{40|}}} }}<!--
    -->{{#if:{{{41|}}} |{{-}}{{{41|}}} }}<!--
    -->{{#if:{{{42|}}} |{{-}}{{{42|}}} }}<!--
    -->{{#if:{{{43|}}} |{{-}}{{{43|}}} }}<!--
    -->{{#if:{{{44|}}} |{{-}}{{{44|}}} }}<!--
    -->{{#if:{{{45|}}} |{{-}}{{{45|}}} }}<!--
    -->{{#if:{{{46|}}} |{{-}}{{{46|}}} }}<!--
    -->{{#if:{{{47|}}} |{{-}}{{{47|}}} }}<!--
    -->{{#if:{{{48|}}} |{{-}}{{{48|}}} }}<!--
    -->{{#if:{{{49|}}} |{{-}}{{{49|}}} }}<!--
    -->{{#if:{{{50|}}} |{{-}}{{{50|}}} }}<!--
--></div>
</div><noinclude>
{{Documentation}}
 
[[Category:Templates]]</noinclude>

Revision as of 15:49, 8 February 2022

List

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


This template creates a

List

with room for up to 50 items using a code-like styling including monospace font.

Parameters

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.

Examples

Standalone template
{{collapsible list code style
|one
|two
|three
|title=Example list
|expand=yes
}}
Example list
one
two
three


Within another element
{{collapsible list code style|one|two|three}}
Example table
List
one
two
three