Template:Flatlist/doc: Difference between revisions

Jump to navigation Jump to search
m (1 revision)
m (clean up)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{Documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->


Line 15: Line 15:


For navigation boxes using {{tl|navbox}}, one can set {{para|listclass|hlist}}, and achieve the same styling without using this template.
For navigation boxes using {{tl|navbox}}, one can set {{para|listclass|hlist}}, and achieve the same styling without using this template.
For image captions, * markup does not work, so consider using {{tl|hlist}} instead.


===Examples===
===Examples===
Line 80: Line 82:


===Parameters===
===Parameters===
* '''class''' – adds a CSS class to the containing div. Passing <tt>hwrap</tt> allows list items to be wrapped.
* '''class''' – adds a CSS class to the containing div. Use <tt>nowraplinks</tt> to prevent links from wrapping.
* '''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.
* '''style''' – adds CSS style options. Complex styles should not be used in articles (per [[SV:deviations]]) but may be acceptable on user, project, and talk pages.
::Example: {{para|<var>style</var>|<var>border:solid 1px silver; background:lightyellow</var>}}
::Example: {{para|<var>style</var>|<var>border:solid 1px silver; background:lightyellow</var>}}
* '''indent''' – indents the list by a number of standard indents (one indent being 1.6em), particularly handy for inclusion in an indented discussion thread.
* '''indent''' – indents the list by a number of standard indents (one indent being 1.6em), particularly handy for inclusion in an indented discussion thread.
Line 88: Line 90:
===Technical details===
===Technical details===
This template uses the <code>.hlist</code> CSS class defined in 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. In these cases, JavaScript in Common.js generates the interpuncts and parentheses.
This template uses the <code>.hlist</code> CSS class defined in 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. In these cases, JavaScript in Common.js generates the interpuncts and parentheses.
===See also===
* {{tl|endflatlist}}
* {{tl|hlist}}
* {{tl|plainlist}} and {{tl|unbulleted list}}
* {{tl|ordered list}} and {{tl|unordered list}}
* {{tl|multi-column numbered list}}
* {{tl|nowrap}}
* {{tl|pagelist}}
* [[SV:HLIST]]
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
[[Category:Typing-aid templates|Flatlist]]
[[Category:Wikipedia list formatting templates|Flatlist]]
}}</includeonly>