Template:Legend/doc: Difference between revisions

Jump to navigation Jump to search
Replaced content with "{{Documentation subpage}} See template documentation on w:Wikipedia until present here. <noinclude>Category:DocumentationCategory:Templates[[Category:Improve..."
(Created page with "{{Documentation subpage}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> Shows a legend row with a colored box. __TOC__ ==Usage== <nowiki>{{</nowik...")
 
(Replaced content with "{{Documentation subpage}} See template documentation on w:Wikipedia until present here. <noinclude>Category:DocumentationCategory:Templates[[Category:Improve...")
Line 1: Line 1:
{{Documentation subpage}}
{{Documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
See template documentation on [[w:Wikipedia|Wikipedia]] until present here.
Shows a legend row with a colored box.
__TOC__


==Usage==
<noinclude>[[Category:Documentation]][[Category:Templates]][[Category:Improvement]]</noinclude>
<nowiki>{{</nowiki>legend|''color''|''label''|outline=''outline color''|border=''css border''<nowiki>}}</nowiki>
 
''color'' is passed to the [[Cascading Style Sheets|css]] background-color property of the color box. The optional ''outline'' parameter is the color of the outline around the box. If you need to customize the border further, you can use the  ''border'' argument, which overrides the ''outline'' argument and sets the css description (e.g., <code>1px solid #aaa</code>) of the border that will be drawn around the box.
 
==Examples==
===Use in text===
<nowiki>{{legend|black|Africa}}</nowiki>
<nowiki>{{legend|green|Americas}}</nowiki>
<nowiki>{{legend|blue|Oceania}}</nowiki>
<nowiki>{{legend|#ffa|Europe|outline=silver}}</nowiki>
<nowiki>{{legend|#ff2800|Asia}}</nowiki>
 
{{legend|black|Africa}}
{{legend|green|Americas}}
{{legend|blue|Oceania}}
{{legend|#ffa|Europe|outline=silver}}
{{legend|#ff2800|Asia}}
 
===Use in a caption ===
<pre><nowiki>
[[Image:Celts in Europe.png|200px|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|yellow|the core Hallstatt territory, expansion before 500 BC}}
]]
</nowiki></pre>
[[Image:Celts in Europe.png|200px|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|yellow|the core Hallstatt territory, expansion before 500 BC}}]]
{{-}}
 
<noinclude>[[Category:Templates]][[Category:Documentation]]</noinclude>

Navigation menu