Difference between revisions of "Template:Legend inline"

From blackwiki
Jump to navigation Jump to search
imported>DePiep
m
imported>Ravenpuff
(add "nowrap" to class to ensure prevention of line breaks)
 
(9 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<includeonly><span style="display:inline-block; width:1.5em; height:1.5em; margin:1px 0; border:{{{border|1px solid {{{outline|black}}}}}}; background-color:{{{1|transparent}}}; color:{{{textcolor|black}}}; font-size:{{{font-size-all|{{{size|100%}}}}}}; text-align:center;">{{#if:{{{text|}}}|<span style="font-size:{{{font-size-all|95%}}};">{{{text}}}</span>|&nbsp;}}</span><span style="font-size:{{{font-size-all|100%}}};">&nbsp;{{{2|}}}</span><!--
+
<includeonly><!--
-->{{#if:{{{size|}}}|[[Category:Pages that use a Legend template and need attention|inline, {{PAGENAME}}]]}}</includeonly><noinclude>
+
--><templatestyles src="Legend/styles.css" /><!--
{{documentation}}
+
--><span class="legend nowrap"><span class="legend-color" style="<!--
</noinclude>
+
-->{{#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><!--
 +
-->&nbsp;{{{2|}}}</span><!--
 +
--></includeonly><noinclude>{{documentation}}</noinclude>

Latest revision as of 21:57, 10 February 2021

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}}