Template:Plainlist/doc
This template uses TemplateStyles: |
This template provides a WCAG/ISO-standards-compliant accessible alternative to <br />
separated lists, which should not be used.
Usage
[edit]{{plainlist}} starts a plain (i.e. unbulleted) list. It uses proper HTML list markup, which is more standards-compliant and more accessible than separating list items with <br />
. Detailed reasons for using this template can be found at WP:UBLIST.
Examples
[edit]{{plainlist|
* [[cat]]
* [[dog]]
* [[horse]]
* [[cow]]
* [[sheep]]
* [[pig]]
}}
Parameters
[edit]- TemplateData
TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard.
Existing template documentation
At Wikimedia Commons, it is recommended to use {{TemplateBox}} with either useTemplateData=1
or useTemplateData=only
on the /doc
subpage and transcluding it with {{Documentation}} into the template. <nowiki>
-tags can be wrapped around the arguments, if required, to avoid templates being expanded.
Newly created template documentation and imports
Another option, especially for imported templates, or for users with JSON experience, is placing raw <templatedata>
-tags into the Wikitext of the template, as described in various Wikipediae.
Wikipedia's help about TemplateData • Commons-specific information
Used to create plain (i.e. unbulleted) lists.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Extra Classes | class | Adds extra CSS classes to the containing div. | String | optional |
CSS Style | style | Adds extra CSS properties. Complex styles should not be used in articles (per [[w: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), particularly handy for inclusion in an indented discussion thread.
| Number | optional |
Content | 1 | The items to include in the list. Each item list should be on its own line starting with an asterisk.
| Content | suggested |
Method
[edit]{{plainlist}} works by constructing a div with the CSS class "plainlist" which has the following style:
/* Should be kept in sync with [[MediaWiki:Common.css]] */
/**
* Unbulleted lists
*/
.plainlist ul {
line-height: inherit;
list-style: none none;
margin: 0;
}
.plainlist ul li {
margin-bottom: 0;
}