「テンプレート:Legend/doc」の版間の差分
細 (1版 をインポートしました) |
2022年8月30日 (火) 19:04時点における最新版
テンプレート:Mbox スクリプトエラー: モジュール「High-use」はありません。 テンプレート:Uses TemplateStyles Shows a legend row with a colored box.
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.)
<templatestyles src="Legend/styles.css" />
<templatestyles src="Legend/styles.css" />
<templatestyles src="Legend/styles.css" />
<templatestyles src="Legend/styles.css" />
<templatestyles src="Legend/styles.css" />
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 テンプレート:Para that have meaning in wikitext can cause unexpected results. To use * in テンプレート:Para, use テンプレート:Para. To use # in テンプレート:Para, use テンプレート:Para.
See also
- Variant blocks
- テンプレート:Tl, legends for lines
- テンプレート:Tl, allows legend templates being used in image captions to use multiple columns
Templates that list colors
TemplateData
Shows a legend row with a colored box and a caption.
引数 | 説明 | 型 | 状態 | |
---|---|---|---|---|
Color | 1 | The color for the legend entry, in any CSS format
| 行 | 必須 |
Caption | 2 | Label for the legend entry
| 文字列 | 推奨 |
CSS border style | border | CSS style for the legend entry's border | 文字列 | 省略可能 |
Entry outline | outline | CSS color for the outline of the legend entry
| 行 | 省略可能 |
Text in the entry | text | Text to be displayed in the legend entry box, i.e. within the color specified
| 行 | 省略可能 |
Text color | textcolor | CSS color of text inside the legend's colored box | 文字列 | 省略可能 |
Size | size | Font size of the legend entry, including colored box | 文字列 | 省略可能 |