Template:Flatlist
Lua error in Module:Effective_protection_level at line 64: attempt to index field 'TitleBlacklist' (a nil value).
| This template can only be edited by administrators because it is transcluded onto one or more cascade-protected pages. |
Lua error in Module:TNT at line 159: Missing JsonConfig extension; Cannot load https://commons.wikimedia.org/wiki/Data:I18n/Uses TemplateStyles.tab.
This template provides a WCAG/ISO standards-compliant accessible alternative to comma-, dash- or other single character-delimited lists, per Manual of Style/Lists § Horizontal lists and Manual of Style:Accessibility § Horizontal lists.
Lists output by {{Flatlist}} and {{Hlist}} are semantically and visually identical, differing only in the underlying wiki-markup they expect as input to create the lists.
Usage
[edit source]{{Flatlist}} starts a horizontal list, such as:
If this template is used with no parameters, {{Endflatlist}} is required. For navigation boxes using {{Navbox}}, one can set |listclass=hlist and achieve the same styling without using this template. For image captions, list (i.e. leading asterisk) markup does not work, so consider using {{Hlist}} instead.
Parameters
[edit source]TemplateData for Flatlist
| ⧼templatedata-doc-param-name⧽ | ⧼templatedata-doc-param-desc⧽ | ⧼templatedata-doc-param-type⧽ | ⧼templatedata-doc-param-status⧽ | |
|---|---|---|---|---|
| Content | 1 | The list to wrap. | ⧼templatedata-doc-param-type-content⧽ | ⧼templatedata-doc-param-status-suggested⧽ |
| Extra Classes | class | Adds extra CSS classes to the containing div. | ⧼templatedata-doc-param-type-string⧽ | ⧼templatedata-doc-param-status-optional⧽ |
| CSS Style | style | Adds extra CSS properties to the containing div. Complex styles should not be used in articles (per MOS:DEVIATIONS) but may be acceptable on user, project and talk pages.
| ⧼templatedata-doc-param-type-string⧽ | ⧼templatedata-doc-param-status-optional⧽ |
| Indent | indent | Indents the list by a number of standard indents (one indent being 1.6em). (Useful in an indented discussion thread.)
| ⧼templatedata-doc-param-type-number⧽ | ⧼templatedata-doc-param-status-optional⧽ |
Examples
[edit source]…produces:
Alternative syntax
[edit source]…produces:
Syntax for ordered lists
[edit source]…produces:
Using optional parameters
[edit source]…produces:
Technical details
[edit source]This template uses the <syntaxhighlight lang="text" class="" style="" inline="1">.hlist</syntaxhighlight> CSS class defined in Template:Hlist/styles.css to generate horizontal lists. It causes ordinary HTML list items to be displayed inline (horizontally), where normally they would be displayed as block elements (vertically). The class also generates the interpuncts between list items and parentheses around nested lists.
| Wikitext | Expanded template | HTML |
|---|---|---|
<syntaxhighlight lang="wikitext">
|
'"`UNIQ--templatestyles-0000001E-QINU`"'<div class="hlist " > * cat * dog * horse * cow * sheep * pig </div> |
<syntaxhighlight lang="html">
|
Maintenance categories
[edit source]See also
[edit source]- {{Endflatlist}}
- {{Hlist}}
- {{Plainlist}} and {{Unbulleted list}}
- {{Bulleted list}}
- {{Ordered list}}
- {{Nowrap}}
- {{Pagelist}}
- Manual of Style:Accessibility § Horizontal lists
