Template:Collapsible START
Like {{Collapse top}}, but easier to customize.
For readability the |}
at the end should be added with {{Collapsible END}}.
numbered parameters:
- 1: title
- 2: any classes, especially
collapsed
oropen
optional parameter:
- style: any styles for the whole table (without quotes!)
styles: {{Collapsible with classes/style.css}}
These classes are defined in the styles:
wide
: make table as wide as the pagefollowed
: remove bottom bordercenter
: center content of all cellslight
,strong
: lighter or stronger colors (and thicker border if strong)gap-above
,gap-below
: add a small margin
(There is also the special class boolf-np
for salmon colored wrapper tables in Studies of Euler diagrams/NP tables.)
use styles without template |
---|
This template creates a table with one header cell, which should be followed by a single content cell. <templatestyles src="Collapsible with classes/style.css" /> {| class="collapsible-with-classes collapsible collapsed wide center" !colspan="2"| foo |- | spam | eggs |} This can be seen in Studies of Euler diagrams/bloated and ...blotted. |
examples
simple, one strong
{{Collapsible START|Foo|collapsed gap-below}} Foo foo foo foo foo foo foo foo foo foo foo foo. {{Collapsible END}} {{Collapsible START|Bar!|open strong}} Bar bar bar bar bar bar! {{Collapsible END}}
Foo |
---|
Foo foo foo foo foo foo foo foo foo foo foo foo. |
Bar! |
---|
Bar bar bar bar bar bar! |
all wide, one light
{{Collapsible START|First|open followed wide}} Open on page load. Without bottom border. {{Collapsible END}} {{Collapsible START|Second|collapsed followed wide}} Closed on page load. Without bottom border. {{Collapsible END}} {{Collapsible START|Third (with nested box)|collapsed wide}} Closed on page load. With bottom border. {{Collapsible START|Nested|collapsed light wide}} Nested box with class <code>light</code>. {{Collapsible END}} {{Collapsible END}}
First |
---|
Open on page load. Without bottom border. |
Second |
---|
Closed on page load. Without bottom border. |
Third (with nested box) | ||
---|---|---|
Closed on page load. With bottom border.
|
color classes
color-cream |
---|
foo |
color-cream |
---|
bar |
color-beige |
---|
color-rose |
---|