Teamplaid:Flatlist/sandbox
This is the template sandbox page for Teamplaid:Flatlist (diff). See also the companion subpage for test cases. |
This is the template sandbox page for Teamplaid:Flatlist (diff). See also the companion subpage for test cases. |
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.
Ùsaid - Usage
deasaich{{Flatlist}} starts a horizontal list, such as:
This template can be used with or without {{Endflatlist}}. 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.
Paramadairean roghainneil - Optional parameters
deasaich- class
- Adds a CSS class to the containing div. Use nowraplinks to prevent links from wrapping.
- style
- Adds CSS styling to the containing div. Complex styles should not be used in articles (per WP:Deviations) but may be acceptable on user, project and talk pages.
- Example:
|style=border:solid 1px silver; background:lightyellow
- indent
- Indents the list by a number of standard indents, one indent being 1.6em. (Useful in an indented discussion thread.)
- Example:
|indent=2
Eisimpleirean - Examples
deasaich {{Flatlist|
* [[cat]]
* [[cù]]
* [[dealan-dé]]
* [[easgann]]
* [[tarbh-nathrach]]
* [[cat-mara]]
}}
produces:
Co-chàradh eile - Alternative syntax
deasaich{{Startflatlist}}
* [[cat]]
* [[cù]]
* [[dealan-dé]]
* [[easgann]]
* [[tarbh-nathrach]]
* [[cat-mara]]
{{Endflatlist}}
produces:
Liostaichean àireamhaichte - Ordered lists
deasaich{{Flatlist|
# [[a h-on]]
# [[a dhà]]
# [[a trì]]
# [[a ceithir]]
# [[a còig]]
# [[a sia]]
}}
produces:
Paramadairean roghainneil - Optional parameters
deasaich {{Flatlist |indent=2
|style=border:solid 1px silver; background:lightyellow;
|class=nowraplinks |
* {{enUici|Alpine skiing at the 1936 Winter Olympics|Alpine skiing at the 1936 Winter Olympics}}
* {{enUici|Alpine skiing at the 1948 Winter Olympics|Alpine skiing at the 1948 Winter Olympics}}
* {{enUici|Alpine skiing at the 1952 Winter Olympics|Alpine skiing at the 1952 Winter Olympics}}
* {{enUici|Alpine skiing at the 1956 Winter Olympics|Alpine skiing at the 1956 Winter Olympics}}
* {{enUici|Alpine skiing at the 1960 Winter Olympics|Alpine skiing at the 1960 Winter Olympics}}
* {{enUici|Alpine skiing at the 1964 Winter Olympics|Alpine skiing at the 1964 Winter Olympics}}
}}
produces:
Mion-fhiosrachadh teicnigeach - Technical details
deasaichThis 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 all browsers, notably Internet Explorer 6 and 7.
Wikitext | Expanded template | HTML |
---|---|---|
{{Flatlist| * cat * cù * dealan-dé * easgann * tarbh-nathrach * cat-mara }} |
<div class="hlist hlist-separated " > * cat * cù * dealan-dé * easgann * tarbh-nathrach * cat-mara </div> |
<div class="hlist">
<ul><li>cat</li>
<li>cù</li>
<li>dealan-dé</li>
<li>easgann</li>
<li>tarbh-nathrach</li>
<li>cat-mara</li></ul>
</div>
|
Ath-stiùiridhean - Redirects
deasaich- {{Flatlist}}
- {{Endflatlist}}
- {{Flt}}
Faic cuideachd - Also see
- {{Hlist}}
- {{Plainlist}} and {{Unbulleted list}}
- {{Bulleted list}}
- {{Ordered list}}
- {{Multi-column numbered list}}
- {{Nowrap}}
- {{Pagelist}}
- WP:HLIST
The above documentation is transcluded from Teamplaid:Flatlist/documentation. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. Please add categories to the /documentation subpage. Subpages of this template. |