Difference between revisions of "Template:Flatlist/testcases"

From blackwiki
Jump to navigation Jump to search
imported>Droll
(tests)
 
imported>Evad37
m (→‎Use inside a table: flatlist/sandbox)
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{template test cases notice}}
 
{{template test cases notice}}
<div class="hlist" style="margin:{{{margin|inherit}}}; margin-left:{{{indent|0}}}em;{{{style|}}}">{{#if:{{{1|}}}|<nowiki />
+
== Without options ==
{{{1}}}
+
=== Active ===
</div>}}<noinclude>{{endflatlist/sandbox}}
 
  
=== Usage ===
+
====old syntax====
Starts a horizontal list, such as:
+
{{flatlist}}
 +
*[[cat]]
 +
*[[dog]]
 +
*[[horse]]
 +
*[[cow]]
 +
*[[sheep]]
 +
*[[pig]]
 +
{{endflatlist}}
  
 +
====new syntax====
 +
{{flatlist|
 +
*[[cat]]
 +
*[[dog]]
 +
*[[horse]]
 +
*[[cow]]
 +
*[[sheep]]
 +
*[[pig]]
 +
}}
 +
 +
====ordered====
 +
{{flatlist|
 +
#[[cat]]
 +
#[[dog]]
 +
#[[horse]]
 +
#[[cow]]
 +
#[[sheep]]
 +
#[[pig]]
 +
}}
 +
 +
=== Sandbox ===
 +
 +
====old syntax====
 
{{flatlist/sandbox}}
 
{{flatlist/sandbox}}
 
*[[cat]]
 
*[[cat]]
Line 14: Line 43:
 
*[[sheep]]
 
*[[sheep]]
 
*[[pig]]
 
*[[pig]]
{{endflatlist/sandbox}}
+
{{endflatlist}}
 +
 
 +
====new syntax====
 
{{flatlist/sandbox|
 
{{flatlist/sandbox|
 
*[[cat]]
 
*[[cat]]
Line 24: Line 55:
 
}}
 
}}
  
Syntax:
+
====ordered====
 +
{{flatlist/sandbox|
 +
#[[cat]]
 +
#[[dog]]
 +
#[[horse]]
 +
#[[cow]]
 +
#[[sheep]]
 +
#[[pig]]
 +
}}
 +
 
 +
== Test indent ==
  
<pre><nowiki>
+
=== Active ===
{{flatlist}}
+
{{flatlist|indent=2|
 
*[[cat]]
 
*[[cat]]
 
*[[dog]]
 
*[[dog]]
Line 34: Line 75:
 
*[[sheep]]
 
*[[sheep]]
 
*[[pig]]
 
*[[pig]]
{{endflatlist}}
+
}}
{{flatlist|
+
 
 +
=== Sandbox ===
 +
{{flatlist/sandbox|indent=2|
 
*[[cat]]
 
*[[cat]]
 
*[[dog]]
 
*[[dog]]
Line 43: Line 86:
 
*[[pig]]
 
*[[pig]]
 
}}
 
}}
</nowiki></pre>
 
  
===Optional parameters===
+
== Other style properties ==
* ''style'', additional CSS style options. Example: ''style = border:solid 1px silver; background:lightyellow'' (complex styles should not be used in articles but may be acceptable on user, project and talk pages)
 
* ''indent'', add left indent by a number of em-spaces, particularly handy for inclusion in an indented discussion thread. Example: ''indent = 2''
 
{{template sandbox notice}}
 
  
=== Examples ===
+
=== Active ===
Normal spacing, indent 2:
+
{{flatlist|style=width:30em; text-align:center;|
{{flatlist/sandbox|indent=2}}
 
 
*[[cat]]
 
*[[cat]]
 
*[[dog]]
 
*[[dog]]
Line 59: Line 97:
 
*[[sheep]]
 
*[[sheep]]
 
*[[pig]]
 
*[[pig]]
{{endflatlist/sandbox}}
+
}}
{{flatlist/sandbox|indent=2|
+
 
 +
=== Sandbox ===
 +
{{flatlist/sandbox|style=width:30em; text-align:center;|
 
*[[cat]]
 
*[[cat]]
 
*[[dog]]
 
*[[dog]]
Line 69: Line 109:
 
}}
 
}}
  
 +
== Mixed ==
  
Compact:
+
=== Active ===
{{flatlist/sandbox |style=margin:0em;}}
+
{{flatlist|indent=2|style=background-color:pink;|
 
*[[cat]]
 
*[[cat]]
 
*[[dog]]
 
*[[dog]]
Line 78: Line 119:
 
*[[sheep]]
 
*[[sheep]]
 
*[[pig]]
 
*[[pig]]
{{endflatlist/sandbox}}
+
}}
{{flatlist/sandbox|style=margin:0em;|
+
 
 +
=== Sandbox ===
 +
{{flatlist/sandbox|indent=2|style=background-color:pink;|
 
*[[cat]]
 
*[[cat]]
 
*[[dog]]
 
*[[dog]]
Line 87: Line 130:
 
*[[pig]]
 
*[[pig]]
 
}}
 
}}
</noinclude>
+
 
 +
==Use inside a table==
 +
===Active===
 +
<div><table class=wikitable><td><li>Before flatlist 1 {{flatlist|
 +
*Flat
 +
*List
 +
*One
 +
}}
 +
After flatlist 1</table></div>
 +
 
 +
===Sandbox===
 +
<div><table class=wikitable><td><li>Before flatlist 1 {{flatlist/sandbox|
 +
*Flat
 +
*List
 +
*One
 +
}}
 +
After flatlist 1</table></div>

Latest revision as of 00:23, 15 August 2016

Without options

Active

old syntax

new syntax

ordered

Sandbox

old syntax

new syntax

ordered

Test indent

Active

Sandbox

Other style properties

Active

Sandbox

Mixed

Active

Sandbox

Use inside a table

Active

  • Before flatlist 1
    • Flat
    • List
    • One
    After flatlist 1
  • Sandbox

  • Before flatlist 1
    • Flat
    • List
    • One
    After flatlist 1