Template:Legend inline: Difference between revisions
Template page
More actions
Created page with "<includeonly><!-- --><templatestyles src="Legend/styles.css" /><!-- --><span class="legend nowrap"><!-- --><span class="legend-color mw-no-invert" 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:{{{t..." |
No edit summary |
||
Line 1: | Line 1: | ||
<includeonly><!-- | <includeonly><!-- | ||
--><templatestyles src="Legend/styles.css" /><!-- | --><templatestyles src="Template:Legend/styles.css" /><!-- | ||
--><span class="legend nowrap"><!-- | --><span class="legend nowrap"><!-- | ||
--><span class="legend-color mw-no-invert" style="<!-- | --><span class="legend-color mw-no-invert" style="<!-- |
Latest revision as of 22:03, 15 March 2025
This template 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.
Example 1
That is a {{legend inline|#bfb|size=80%}} green box.
That is a green box.
Example 2
That is a {{legend inline|#bfb|text=green}} box.
That is a green box.
Example 3
That is a {{legend inline |#bfb |box |border = 1px solid red |textcolor = #00e |size = 150% |text = _green_}}.
That is a green box .
See also
- For the original version of this template using display:block, see {{Legend}}
- For legend rows representing lines, see {{legend-line}}