Template:Legend inline: Difference between revisions

From Vigyanwiki
(Created page with "<includeonly><!-- --><templatestyles src="Legend/styles.css" /><!-- --><span class="legend nowrap"><!-- --><span class="legend-color" style="<!-- -->{{#if:{{{border|}}}|bord...")
m (1 revision imported from alpha:Template:Legend_inline)
 
(3 intermediate revisions by 2 users not shown)
Line 2: Line 2:
--><templatestyles src="Legend/styles.css" /><!--
--><templatestyles src="Legend/styles.css" /><!--
--><span class="legend nowrap"><!--
--><span class="legend nowrap"><!--
   --><span class="legend-color" style="<!--
   --><span class="legend-color mw-no-invert" style="<!--
-->{{#if:{{{border|}}}|border: {{{border}}};|{{#if:{{{outline|}}}|border: 1px solid {{{outline}}};}}}}<!--
-->{{#if:{{{border|}}}|border: {{{border}}};|{{#if:{{{outline|}}}|border: 1px solid {{{outline}}};}}}}<!--
-->{{#if:{{{1|}}}|{{greater color contrast ratio|{{{1}}}|white|black|css=y}}}}<!--
-->{{#if:{{{1|}}}|{{greater color contrast ratio|{{{1}}}|white|black|css=y}}}}<!--

Latest revision as of 14:47, 3 February 2023

Template documentation

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.

Limitations

Using certain special characters in |text= that have meaning in wikitext can cause unexpected results. To use * in |text=, use |text={{asterisk}}. To use # in |text=, use |text={{number sign}}.

See also

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