Teamplaid:Legend
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
deasaichUse 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
deasaichMarkup | 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}} ]] |
|
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
- Variant blocks
- {{Legend striped}}, two colors, for striped color areas
- {{Legend inline}}, uses display:inline to avoid line breaks after each legend
- {{Legend0}}, without the line-feed
- {{Legend2}}, without block formatting
- {{Legend4}}, with indented block formatting
- {{Leftlegend}}, with text-align set to left
- {{Color box}} and {{RouteBox}}, with text placed inside the colored legend and article linking
- {{Legend-line}}, legends for lines
- Web colors
Teamplaid-dàta - TemplateData
deasaichThis 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.
Paramadair | Tuairisgeul | Seòrsa | Staid | |
---|---|---|---|---|
Color | 1 | The color for the legend entry, in any CSS format
| Loidhne | riatanach |
Caption | 2 | Label for the legend entry
| Sreang | molta |
CSS border style | border | CSS style for the legend entry's border | Sreang | roghainneil |
Entry outline | outline | CSS color for the outline of the legend entry
| Loidhne | roghainneil |
Text in the entry | text | Text to be displayed in the legend entry box, i.e. within the color specified
| Loidhne | roghainneil |
Text color | textcolor | CSS color of text inside the legend's colored box | Sreang | roghainneil |
size | size | Size of the legend entry | Sreang | roghainneil |
The above documentation is transcluded from Teamplaid:Legend/documentation. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /documentation subpage. Subpages of this template. |