Template:Legend: Difference between revisions

From Roses, Tulips, & Liberty
Content added Content deleted
(does this work?)
m (99 revisions imported from wikipedia:Template:Legend)
 
(61 intermediate revisions by 42 users not shown)
Line 1: Line 1:
<includeonly><!--
<onlyinclude><div style="margin:0px;font-size:90%;padding-left:2.2em;clear:both;">
--><templatestyles src="Legend/styles.css" /><!--
<div style="float:left; height:1.2em; width:1.6em; background:{{{1|none}}}; border:{{{border|solid silver 1px}}};margin-left:-2.2em"/>{{{2|}}}</div></onlyinclude>
--><div class="legend"><!--
<!-- You are advised to read the talk page before changing this template. -->
--><span class="legend-color mw-no-invert" style="<!--
Shows a legend row with a colored box.
-->{{#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>


<div style="float:left; height:0.8em; width:1.2em; background:black; border:solid silver 1px;clear:both;margin-top:0.2em"/><p style="margin:0px;font-size:90%;margin-left:1.8em;">Africa</p>
<div style="float:left; height:0.8em; width:1.2em; background:green; border:solid silver 1px;clear:both;margin-top:0.2em"/><p style="margin:0px;font-size:90%;margin-left:1.8em;">Americas</p>
<div style="float:left; height:0.8em; width:1.2em; background:blue; border:solid silver 1px; clear:both;margin-top:0.2em"/><p style="margin:0px;font-size:90%;margin-left:1.8em;">Oceania</p>
<div style="float:left; height:0.8em; width:1.2em; background:#ff0; border:solid silver 1px; clear:both;margin-top:0.2em"/><p style="margin:0px;font-size:90%;margin-left:1.8em;">Europe</p>
<div style="float:left; height:0.8em; width:1.2em; background:#ff2800; border:solid silver 1px; clear:both;margin-top:0.2em"/><p style="margin:0px;font-size:90%;margin-left:1.8em;">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]]
[[sr:Шаблон:Легенда]]
[[vi:Tiêu bản:Legend]]

Latest revision as of 18:58, 17 February 2024