Template documentation[view] [edit] [history] [purge]

Shows a legend row with a colored box.

Ùsaid - Usage

deasaich
{{Legend|background-color|caption|outline=outline color|border=css border}}
  • background-color is passed to the css background-color property of the color box.
  • The optional outline parameter is the color of the outline around the box.
  • The optional border argument which overrides the outline argument and sets the css description (e.g., 1px solid #aaa) of the border that will be drawn around the box.

Eisimpleirean - Examples

deasaich

Use in text

deasaich
  • {{Legend|black|Africa}} → 
      Africa
  • {{Legend|dubh|Africa}} → 
      Africa
  • {{Legend|green|Americas}} → 
      Americas
  • {{Legend|blue|Oceania}} → 
      Oceania
  • {{Legend|#ffa|Europe}} → 
      Europe
  • {{Legend|#ff2800|Asia}} → 
      Asia
    (#A2A9B1 is the wikitables border color.)

Use in captions

deasaich
Markup Renders as
 [[File:Celts in Europe.png|upright=.9|thumb|right|The Celts in Europe, past and present:
 {{Legend|#1a8000|Present-day Celtic-speaking areas}}
 {{Legend|#27c600|Other parts of the six most commonly recognized "Celtic nations" and where a Celtic language is spoken but not the dominating language}}
 {{Legend|#97ffb6|Other parts of Europe once peopled by Celts; modern-day inhabitants of many of these areas often claim a Celtic heritage and/or culture}}
 {{Legend|#D2FFD2|Lusitanian area of Iberia, "Celticity" uncertain}}
 {{Legend|yellow|The core Hallstatt territory, expansion before 500 BC}}
 ]]
 
The Celts in Europe, past and present:
  Present-day Celtic-speaking areas
  Other parts of the six most commonly recognized "Celtic nations" and where a Celtic language is spoken but not the dominating language
  Other parts of Europe once peopled by Celts; modern-day inhabitants of many of these areas often claim a Celtic heritage and/or culture
  Lusitanian area of Iberia, "Celticity" uncertain
  The core Hallstatt territory, expansion before 500 BC


Paramadairean - Parameters

deasaich
{{Legend
| [legend box's colo(u)r]
| [text following legend box]
| outline =  <!--colo(u)r of border around legend box-->
| border =   <!--use to specify custom CSS styling for border (overrides 'outline')-->
| color =    <!--colo(u)r of 'text'-->
| size =     <!--'text' font-size-->
| text =     <!--to place text inside the legend box-->
}}

Faic cuideachd - Also see


Teamplaid-dàta - TemplateData

deasaich
This is the WP:TemplateData documentation for this template used by WP:VisualEditor and other tools; see the monthly parameter usage report for this template.

TemplateData for Legend

Shows a legend row with a colored box and a caption.

Paramadairean na teamplaide[Stiùirich an TemplateData]

ParamadairTuairisgeulSeòrsaStaid
Color1

The color for the legend entry, in any CSS format

Ball-eisimpleir
"#6D6E00", "#ffa", "yellow"
Loidhneriatanach
Caption2

Label for the legend entry

Ball-eisimpleir
"soda" is most common
Sreangmolta
CSS border styleborder

CSS style for the legend entry's border

Sreangroghainneil
Entry outlineoutline

CSS color for the outline of the legend entry

Ball-eisimpleir
silver
Loidhneroghainneil
Text in the entrytext

Text to be displayed in the legend entry box, i.e. within the color specified

Ball-eisimpleir
Af
Loidhneroghainneil
Text colortextcolor

CSS color of text inside the legend's colored box

Sreangroghainneil
sizesize

Size of the legend entry

Sreangroghainneil