Template:Flatlist/doc: Difference between revisions
m →Parameters: fix TemplateData description |
m 1 revision imported |
||
(No difference)
| |||
Latest revision as of 14:35, 1 January 2026
| This is a documentation subpage for Template:Terminate sentence It may contain usage information, categories and other content that is not part of the original template page. |
| This template is used in MediaWiki:Pageinfo-header, and on approximately 2,550,000 pages, or roughly 107777% of all pages. Changes to it can cause immediate changes to the XMethod Wiki user interface. To avoid major disruption and server load, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Please discuss changes on the talk page before implementing them. |
| Editing of this template by all users is currently disabled. Changes can only be done by administrators, because it has been transcluded onto one or more cascade-protected pages. If you want to make an edit request, please submit them on the talk page. |
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- or dash- (or other single character-) separated lists, per WP:FLATLIST and MOS:HLIST.
Lists output by {{Flatlist}} and {{Hlist}} are semantically and visually identical, and differ only in the wiki-markup used to create the lists.
Usage
{{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. asterisk) markup does not work, so consider using {{hlist}} instead.
Parameters
TemplateData for Flatlist
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Content | 1 | The list to wrap. | Content | suggested |
| Extra Classes | class | Adds extra CSS classes to the containing div. | String | 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.
| String | optional |
| Indent | indent | Indents the list by a number of standard indents (one indent being 1.6em). (Useful in an indented discussion thread.)
| Number | optional |
Examples
<syntaxhighlight lang="wikitext">
</syntaxhighlight>
produces:
Alternative syntax
<syntaxhighlight lang="wikitext">
</syntaxhighlight>
produces:
Syntax for ordered lists
<syntaxhighlight lang="wikitext">
</syntaxhighlight>
produces:
Using optional parameters
<syntaxhighlight lang="wikitext">
</syntaxhighlight>
produces:
Technical details
This template uses the .hlist CSS class defined in Template:Hlist/styles.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.
| Wikitext | Expanded template | HTML |
|---|---|---|
<syntaxhighlight lang="wikitext">
</syntaxhighlight> |
'"`UNIQ--templatestyles-00000017-QINU`"'<div class="hlist " > * cat * dog * horse * cow * sheep * pig </div> |
<syntaxhighlight lang="html">
</syntaxhighlight> |
Maintenance categories
See also
- {{endflatlist}}
- {{hlist}}
- {{plainlist}} and {{unbulleted list}}
- {{bulleted list}}
- {{ordered list}}
- {{nowrap}}
- {{pagelist}}
- WP:HLIST
