Legend
-
- vor 3 Jahren zuletzt von Systembenutzer bearbeitet
-
Vorlage:Uses TemplateStyles Shows a legend row with a colored box.
Inhaltsverzeichnis
Usage
{{legend|background-color|caption|outline=outline color|border=css border}}
- background-color is passed to the css background-color property of the color box.
- The optional outline parameter is the color of the outline around the box.
- The optional border argument which overrides the outline argument and sets the css description (e.g.,
1px solid #aaa
) of the border that will be drawn around the box.
Examples
Use in text
{{legend|black|Africa}}
{{legend|green|Americas}}
{{legend|blue|Oceania}}
{{legend|#ffa|Europe|outline=silver}}
{{legend|#ff2800|Asia|outline=#A2A9B1}} (#A2A9B1 is the wikitables border color.)
Use in captions
Full parameter list
{{legend | [legend box's colo(u)r] | [text following legend box] | outline = <!--colo(u)r of border around legend box--> | border = <!--use to specify custom CSS styling for border (overrides 'outline')--> | color = <!--colo(u)r of 'text'--> | size = <!--'text' font-size--> | text = <!--to place text inside the legend box--> }}
Limitations
Using certain special characters in Vorlage:Para that have meaning in wikitext can cause unexpected results. To use Vorlage:Asterisk in Vorlage:Para, use Vorlage:Para. To use # in Vorlage:Para, use Vorlage:Para.
See also
- Variant blocks
- Vorlage:Tl, two colors, for striped color areas
- Vorlage:Tl, uses display:inline to avoid line breaks after each legend
- Vorlage:Tl, without the line-feed
- Vorlage:Tl, with text-align set to left
- Vorlage:Tl and Vorlage:Tl, with text placed inside the colored legend and article linking
- Vorlage:Tl, legends for lines
- Vorlage:Tl, allows legend templates being used in image captions to use multiple columns
- Web colors
TemplateData
TemplateData
Nachfolgend finden sich die TemplateData Informationen für diese Vorlage. Genutzt werden diese Daten von den Extensions TemplateWizard, VisualEditor und vielen weiteren.
VorlagenDaten/TemplateData für das Template "Legend"
Shows a legend row with a colored box and a caption.
Parameter | Beschreibung | Typ | Status | |
---|---|---|---|---|
Color | 1 | The color for the legend entry, in any CSS format
| Zeile | erforderlich |
Caption | 2 | Label for the legend entry
| Zeichenfolge | vorgeschlagen |
CSS border style | border | CSS style for the legend entry's border
| Zeichenfolge | optional |
Entry outline | outline | CSS color for the outline of the legend entry
| Zeile | optional |
Text in the entry | text | Text to be displayed in the legend entry box, i.e. within the color specified
| Zeile | optional |
Text color | textcolor | CSS color of text inside the legend's colored box
| Zeichenfolge | optional |
Size | size | Font size of the legend entry, including colored box
| Zeichenfolge | optional |