Template:Flatlist/doc: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Dodoïste (talk | contribs)
reverting LtPowers, you're not supposed to add line breaks in the first place, it breaks accessibility. See Wikipedia:Lists#List_styles and Wikipedia:ACCESS#Lists
restore change - I don't see anything on those policy pages that prohibits line breaks to break up a long horizontal list. Surely it doesn't break accessibility any more than successive flatlist tags?
Line 36: Line 36:
* [[pig]]
* [[pig]]
}}
}}



;Alternative syntax:
;Alternative syntax:
Line 57: Line 58:
* [[pig]]
* [[pig]]
{{endflatlist}}
{{endflatlist}}


;Multi-line:
<pre><nowiki>
{{flatlist}}
* [[cat]]
* [[dog]]
* [[horse]]

* [[cow]]
* [[sheep]]
* [[pig]]
{{endflatlist}}
</nowiki></pre>

{{flatlist}}
* [[cat]]
* [[dog]]
* [[horse]]

* [[cow]]
* [[sheep]]
* [[pig]]
{{endflatlist}}



;Syntax for ordered lists:
;Syntax for ordered lists:

Revision as of 18:10, 13 July 2012

Usage

{{Flatlist}} starts a horizontal list, such as:

The bottom margin is inherited from the current container. Normally this will be 0.5em. 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.

Examples

{{flatlist |
* [[cat]]
* [[dog]]
* [[horse]]
* [[cow]]
* [[sheep]]
* [[pig]]
}}


Alternative syntax
{{flatlist}}
* [[cat]]
* [[dog]]
* [[horse]]
* [[cow]]
* [[sheep]]
* [[pig]]
{{endflatlist}}


Multi-line
{{flatlist}}
* [[cat]]
* [[dog]]
* [[horse]]

* [[cow]]
* [[sheep]]
* [[pig]]
{{endflatlist}}


Syntax for ordered lists
{{flatlist | class=hnum |
# [[first]]
# [[second]]
# [[third]]
# [[fourth]]
# [[fifth]]
# [[sixth]]
}}

Parameters

  • class – adds a CSS class to the containing div.
  • style – adds CSS style options. 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), particularly handy for inclusion in an indented discussion thread.
Example: |indent=2

See also