Template:Unbulleted indent list/doc: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
SockyPaws (talk | contribs)
m Fix redlinks
Tag: 2017 source edit
SockyPaws (talk | contribs)
Fix wikitext example rendering with enclosing div tags instead of pre
Tag: 2017 source edit
Line 13: Line 13:
  | label2    = Awards
  | label2    = Awards
  | data2    = {{Unbulleted indent list|[[wikipedia:Royal Geographical Society's Founder's Medal|Royal Geographical Society's Founder's Medal]] (1888)|[[wikipedia:Knight Commander of the Order of the Bath|Knight Commander of the Order of the Bath]] (1896)|[[wikipedia:Chevalier dans l'Ordre de la Légion d'Honneur|Chevalier dans l'Ordre de la Légion d'Honneur]] (1899)}}
  | data2    = {{Unbulleted indent list|[[wikipedia:Royal Geographical Society's Founder's Medal|Royal Geographical Society's Founder's Medal]] (1888)|[[wikipedia:Knight Commander of the Order of the Bath|Knight Commander of the Order of the Bath]] (1896)|[[wikipedia:Chevalier dans l'Ordre de la Légion d'Honneur|Chevalier dans l'Ordre de la Légion d'Honneur]] (1899)}}
  | label3    = Second label
  | label3    = {{Nowrap|Second label}}
  | data3    = Some more data
  | data3    = Some more data
}}
}}


<pre style="border: 3px ridge #ccc; margin-left:4em; max-width: 33vw;"><nowiki>
<pre style="border: 3px ridge #ccc; margin-left: 4em; max-width: 42.5vw; min-width: 33vw;"><nowiki>
{{Infobox
{{Infobox
  | title  = Example
  | title  = Example
Line 37: Line 37:
  | data1    = Some data
  | data1    = Some data
  | label2    = Awards
  | label2    = Awards
  | data2    = {{Unbulleted indent list|[[wikipedia:Royal Geographical Society's Founder's Medal|Royal Geographical Society's Founder's Medal]] (1888)|[[wikipedia:Knight Commander of the Order of the Bath|Knight Commander of the Order of the Bath]] (1896)|[[wikipedia:Chevalier dans l'Ordre de la Légion d'Honneur|Chevalier dans l'Ordre de la Légion d'Honneur]] (1899)}}
  | data2    = {{Unbulleted indent list|indent=2em|[[wikipedia:Royal Geographical Society's Founder's Medal|Royal Geographical Society's Founder's Medal]] (1888)|[[wikipedia:Knight Commander of the Order of the Bath|Knight Commander of the Order of the Bath]] (1896)|[[wikipedia:Chevalier dans l'Ordre de la Légion d'Honneur|Chevalier dans l'Ordre de la Légion d'Honneur]] (1899)}}
  | label3    = Second label
  | label3    = {{Nowrap|Second label}}
  | data3    = Some more data
  | data3    = Some more data
}}
}}


<pre style="border: 3px ridge #ccc; margin-left:4em; max-width: 33vw;"><nowiki>
<div style="background-color: #f8f9fa; border: 3px ridge #ccc; color: #000; font-family: Menlo, Consolas, Monaco, 'Noto Mono', 'Nimbus Mono L', monospace; font-size: 1em; margin-left: 4em; max-width: 42.5vw; min-width: 33vw; padding: 1em; overflow: auto; white-space: pre;">&lbrace;{Infobox<br />&#32;| label1 = Some data<br />&#32;| awards = &lbrace;{Unbulleted indent list|<span style="background-color: lightgreen; border: 2px dashed red; padding: 1px 4px;">indent&#61;2em</span><br />&#32;&#32;&#32; | &lsqb;[Royal Geographical Society's Founder's Medal]] (1888)<br />&#32;&#32;&#32; | &lsqb;[Knight Commander of the Order of the Bath]] (1896)<br />&#32;&#32;&#32; | &lsqb;[Chevalier dans l'Ordre de la Légion d'Honneur]] (1899)<br />&#32;&#32; }}<br />&#32;| label2 = Some more data<br/>}}</div>
{{Infobox
| label1 = Some data
| awards = {{Unbulleted indent list|</nowiki>{{Bg|lightgreen|indent&#61;2em}}<nowiki>
    | [[Royal Geographical Society's Founder's Medal]] (1888)
    | [[Knight Commander of the Order of the Bath]] (1896)
    | [[Chevalier dans l'Ordre de la Légion d'Honneur]] (1899)
  }}
| label2 = Some more data
}}
</nowiki></pre>


=== TemplateData ===
=== TemplateData ===

Revision as of 13:53, 27 September 2024

The {{Unbulleted indent list}} template is very similar to {{Unbulleted list}}, except that it automatically indents the wrapped parts of long items which appear beneath an entry. This makes it easier to distinguish multiple such items when width is limited—such as in {{Infobox}}—and makes more efficient use of horizontal space by eliminating the need for bullet markers to indicate the start of each entry.

This template provides a WCAG-compliant and accessible alternative to <br />-separated lists.

Usage

Example
First labelSome data
Awards
Second labelSome more data
{{Infobox
 | title  = Example
 | label1 = Some data
 | awards = {{Unbulleted indent list
    | [[Royal Geographical Society's Founder's Medal]] (1888)
    | [[Knight Commander of the Order of the Bath]] (1896)
    | [[Chevalier dans l'Ordre de la Légion d'Honneur]] (1899)
   }}
 | label2 = Some more data
}}

Custom indentation

Example
First labelSome data
Awards
Second labelSome more data
{{Infobox
| label1 = Some data
| awards = {{Unbulleted indent list|indent=2em
| [[Royal Geographical Society's Founder's Medal]] (1888)
| [[Knight Commander of the Order of the Bath]] (1896)
| [[Chevalier dans l'Ordre de la Légion d'Honneur]] (1899)
}}
| label2 = Some more data
}}

TemplateData

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for this template in articles based on this TemplateData.

TemplateData for Unbulleted indent list

Show an unbulleted list the any wrapped lines of entries indented

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Content1

Every line should start with a pipe character.

Contentrequired
Indentationin indent

Custom indentation width for wrapped lines of list entries; must have valid CSS length unit appended

Default
1em
Example
2em
Lineoptional
List stylelist_style

CSS declarations for the <ul> XHTML tag

Example
background-color: lightyellow; border: 1px solid silver;
Lineoptional

See also