Difference between revisions of "Template:Legend4"

From blackwiki
Jump to navigation Jump to search
imported>Windroff
m
imported>Nihiltres
(Added role="presentation" to table element)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<includeonly><table class="legend" cellspacing="0"><tr><td style="vertical-align:text-top;"><span class="legend-color" style="display:inline-block; width:1.5em; height:1.5em; margin:0px 2px 0px 0px; border:{{{border|1px solid {{{outline|black}}}}}}; background-color:{{trim|{{{1|transparent}}}}}; color:{{{textcolor|black}}}; font-size:{{{size|100%}}}; text-align:left;">{{#if:{{{text|}}}|<span class="legend-text" style="font-size:95%;">{{{text}}}</span>|&nbsp;}}</span></td><td>{{{2|}}}</td></tr></table></includeonly><noinclude>
+
<includeonly><!--
{{Documentation}}
+
--><templatestyles src="Legend/styles.css" /><!--
</noinclude>
+
--><table class="legend" cellspacing="0" role="presentation"><!--
 +
--><tr><!--
 +
--><td style="vertical-align:text-top;"><!--
 +
--><span class="legend-color" 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|}}}|<span class="legend-text">{{{text}}}</span>|&nbsp;}}</span><!--
 +
--></td><td>{{{2|}}}</td><!--
 +
--></tr></table><!--
 +
--></includeonly><noinclude>{{Documentation}}</noinclude>

Latest revision as of 16:05, 21 September 2020

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

Script error: No such module "Uses TemplateStyles". A version of {{Legend}} that uses indented block formatting via formatting the legend as a small table.

Usage

  • {{Legend4|#ff0000|Example}}
  • {{Legend4|#0000ff|Foobar|text=Ex|border=1px dashed red}}

See also