Template:Flatlist

From CWCki
Jump to navigation Jump to search
Template documentation (for the template shown above, sometimes hidden or invisible)

Template:Redirect

Template:Used in system Template:Tlr This template provides a WCAG/ISO-standards-compliant accessible alternative to comma- or dash- (or other single character-) separated lists, per WP:FLATLIST and WP:HLIST.

Usage

{{flatlist}} (Usage) starts a horizontal list, such as:

This template can be used with or without {{endflatlist}} (Usage). For navigation boxes using {{navbox}} (Usage), one can set Template:Para, and achieve the same styling without using this template. For image captions, list (i.e. asterisk) markup does not work, so consider using {{hlist}} (Usage) instead.

Parameters

Template:Format TemplateData

Examples

<syntaxhighlight lang="moin">

</syntaxhighlight>

produces:

Alternative syntax

<syntaxhighlight lang="moin"> Template:Startflatlist

</syntaxhighlight>

produces:

Template:Startflatlist

Syntax for ordered lists

<syntaxhighlight lang="moin">

</syntaxhighlight>

produces:

Using optional parameters

<syntaxhighlight lang="moin">

</syntaxhighlight>

produces:

Technical details

This template uses the .hlist CSS class defined in MediaWiki:Common.css to generate horizontal lists. It causes ordinary html list items to be displayed inline (horizontally), where they would normally display as block elements (vertically). The class also generates the interpuncts between list items and parentheses around nested lists. Some of the CSS used is not compatible with some older browsers, notably Internet Explorer 6 and 7.

Wikitext Expanded template HTML
{{flatlist|
* cat
* dog
* horse
* cow
* sheep
* pig
}}
Template:Nowiki2 <syntaxhighlight lang="html">
  • cat
  • dog
  • horse
  • cow
  • sheep
  • pig

</syntaxhighlight>

See also

Template:HTML lists Template:Sandbox other


Visit Template:Flatlist/doc to edit this text! (How does this work?)