• Home
  • Random
  • Nearby
  • Log in
  • Settings
Donate Now If Wikipedia is useful to you, please give today.
  • About Wikipedia
  • Disclaimers
Wikipedia

Template:Legend-line/sandbox

  • Template
  • Talk
  • Language
  • Watch
  • Edit
< Template:Legend-line
This is the template sandbox page for Template:Legend-line (diff).
See also the companion subpage for test cases.
Template documentation[view] [edit] [history] [purge]
CSSThis template uses TemplateStyles:
  • Template:Legend/styles.css

Usage

edit

Shows a legend row with a colored line.

{{legend-line|line type|label}}

line type is passed to the css border property, and can include properties like solid, dotted, dashed, double, etc.

Examples
  Borders in 1914
  Borders in 1920
  Borders in 1926
  Borders in 1932
  Borders in 1938
{{legend-line|black solid 2px|Borders in 1914}}
{{legend-line|red dotted 2px|Borders in 1920}}
{{legend-line|green dashed 2px|Borders in 1926}}
{{legend-line|orange groove 6px|Borders in 1932}}
{{legend-line|blueviolet double 6px|Borders in 1938}}

Inline:   Borders in 1914   Borders in 1920   Borders in 1926

{{legend-line|black solid 2px|Borders in 1914|inline=yes}}
{{legend-line|red dotted 2px|Borders in 1920|inline=yes}}
{{legend-line|green dashed 2px|Borders in 1926|inline=yes}}

See also

edit
  • Template:Legend

TemplateData

edit
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Legend-line in articles based on its TemplateData.

TemplateData for Legend-line

Shows a legend entry with a styled line (including color)

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
CSS style1

The CSS style for the legend entry

Example
2px dashed black
Stringrequired
Caption2

Text displayed in the entry, next to the line style

Example
Borders in 1920
Linerequired
inline?inline

If 'yes', suppresses new line/line feed

Example
yes
Stringoptional
The above documentation is transcluded from Template:Legend-line/doc. (edit | history)
Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Legend-line/sandbox&oldid=981158794"
Last edited on 30 September 2020, at 16:45

Languages

      This page is not available in other languages.

      Wikipedia
      • Wikimedia Foundation
      • Powered by MediaWiki
      • This page was last edited on 30 September 2020, at 16:45 (UTC).
      • Content is available under CC BY-SA 4.0 unless otherwise noted.
      • Privacy policy
      • About Wikipedia
      • Disclaimers
      • Contact Wikipedia
      • Code of Conduct
      • Developers
      • Statistics
      • Cookie statement
      • Terms of Use
      • Desktop