Difference between revisions of "Template:Legend inline"

From blackwiki
Jump to navigation Jump to search
imported>Nihiltres
(Added span wrapper and classes to match classes used in Template:Legend)
imported>Nihiltres
(Updated from sandbox to use TemplateStyles)
Line 1: Line 1:
<includeonly><span class="legend"><span class="legend-color" style="display:inline-block; width:1.5em; height:1.5em; margin:1px 0; border:{{{border|1px solid {{{outline|black}}}}}}; background-color:{{trim|{{{1|transparent}}}}}; color:{{{textcolor|black}}}; font-size:{{{size|100%}}}; text-align:center;">{{#if:{{{text|}}}|<span class="legend-text" style="font-size:95%;">{{{text}}}</span>|&nbsp;}}</span>&nbsp;{{{2|}}}</span></includeonly><noinclude>
+
<includeonly><templatestyles src="Legend/styles.css" /><span class="legend"><span class="legend-color" style="<!--
 +
-->{{#if:{{{border|}}}|border: {{{border}}};|{{#if:{{{outline|}}}|border: 1px solid {{{outline}}};}}}} <!--
 +
-->{{#if:{{{1|}}}|background-color:{{trim|{{{1}}}}};}} <!--
 +
-->{{#if:{{{textcolor|}}}|color:{{{textcolor}}};}} <!--
 +
-->{{#if:{{{size|}}}|font-size:{{{size}}};}}<!--
 +
-->">{{#if:{{{text|}}}|<span class="legend-text" style="font-size:95%;">{{{text}}}</span>|&nbsp;}}</span>&nbsp;{{{2|}}}</span></includeonly><noinclude>
 
{{documentation}}
 
{{documentation}}
 
</noinclude>
 
</noinclude>

Revision as of 20:13, 15 August 2020

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

Script error: No such module "Uses TemplateStyles".

Description

  • Shows a legend with a coloured box.
  • This template differs from Template:Legend only in that it uses display:inline to prevent line breaks after each legend.

Usage

See Template:Legend/doc for usage.

See also

  • For the original version of this template using display:block, see {{Legend}}
  • For legend rows representing lines, see {{legend-line}}