Template:Legend: Difference between revisions

From Roses, Tulips, & Liberty
Content added Content deleted
(cat)
m (99 revisions imported from wikipedia:Template:Legend)
 
(56 intermediate revisions by 40 users not shown)
Line 1: Line 1:
<includeonly><!--
<onlyinclude><p style="margin:0px;font-size:90%"><span style="border:{{{border|none}}};background-color:{{{1|none}}};color:{{{1|none}}};">██</span>&nbsp;{{{2|}}}</p></onlyinclude>
--><templatestyles src="Legend/styles.css" /><!--
<!-- You are advised to read the talk page before changing this template. -->
--><div class="legend"><!--
Shows a legend row with a colored box.
--><span class="legend-color mw-no-invert" style="<!--
-->{{#if:{{{border|}}}|border: {{{border}}};|{{#if:{{{outline|}}}|border: 1px solid {{{outline}}};}}}}<!--
-->{{#if:{{{1|}}}|{{greater color contrast ratio|{{{1}}}|white|black|css=y}}}}<!--
-->{{#if:{{{textcolor|}}}|color:{{{textcolor}}};}}<!--
-->{{#if:{{{size|}}}|font-size:{{{size}}};}}"><!--


-->{{#if:{{{text|}}}{{{alt|}}}
;Usage:
| <span class="legend-text" style="{{#if:{{{alt|}}}|color:{{{1|}}};}}font-family: monospace, monospace;">{{If empty|{{{alt|}}}|{{{text|}}}|&nbsp;}}</span>|&nbsp;}}<!--
<nowiki>{{</nowiki>legend|''color''|''label''|border=''border''<nowiki>}}</nowiki>
--></span><!--


-->&nbsp;{{{2|}}}<!--
''color'' is passed to the [[Cascading Style Sheets|css]] background property, so it can also include images. The optional ''border'' argument is passed to the css border property.


--></div><!--
;Example:
--></includeonly><noinclude>
<nowiki>{{legend|black|Africa}}</nowiki>
{{Documentation}}
<nowiki>{{legend|green|Americas}}</nowiki>
</noinclude>
<nowiki>{{legend|blue|Oceania}}</nowiki>
<nowiki>{{legend|#ff0|Europe}}</nowiki>
<nowiki>{{legend|#ff2800|Asia}}</nowiki>


<p style="margin:0px;font-size:90%"><span style="border:none;color:black;background-color:black">mm</span>&nbsp;Africa</p>
<p style="margin:0px;font-size:90%"><span style="border:none;color:green;background-color:green">mm</span>&nbsp;Americas</p>
<p style="margin:0px;font-size:90%"><span style="border:none;color:blue;background-color:blue">mm</span>&nbsp;Oceania</p>
<p style="margin:0px;font-size:90%"><span style="border:none;color:#FF0;background-color:#FF0">mm</span>&nbsp;Europe</p>
<p style="margin:0px;font-size:90%"><span style="border:none;color:#FF2800;background-color:#FF2280">mm</span>&nbsp;Asia</p>


For legends involving lines on a map, see {{tl|legend-line}}.

[[de:Vorlage:Legende]]
[[es:Plantilla:Legend]]
[[ko:Template:범례]]
[[hu:Sablon:Jelmagyarázat]]
[[pl:Szablon:Legenda]]
[[ru:Шаблон:Легенда]]
[[sr:Шаблон:Легенда]]
[[vi:Tiêu bản:Legend]]
[[zh:Template:Legend]]
[[Category:Legend templates]]

Latest revision as of 18:58, 17 February 2024