Anonymous user
Template:Composition bar/doc: Difference between revisions
update for width parameter change (now allows units), new border/border-color parameter
(background-color default correction) |
(update for width parameter change (now allows units), new border/border-color parameter) |
||
Line 18:
; background-color=...
: (default is transparent) is the background color of the right part of the bar - a valid [[web colors|web color]].
; border=...
: (default is medium grey) is the color of the border, or "none" for no border
; width=...
: (default is
; per=...
: (default is false), when set to any value (true), adds a percentage to the bar as well
Line 31 ⟶ 33:
| {{Composition bar|50|100|red}}
|-
| style="font-size: 95%"| <code><nowiki>{{Composition bar|50|100|
| {{Composition bar|50|100|
|-
| style="font-size: 95%"| <code><nowiki>{{Composition bar|50|100|#99F|width=85%}}</nowiki></code>
| {{Composition bar|50|100|#99F|width=85%}}
|-
| style="font-size: 95%"| <code><nowiki>{{Composition bar|50|100|{{Green Party (UK)/meta/color}}}}</nowiki></code>
Line 78 ⟶ 80:
"label": "3",
"description": "The background color of the left part of the bar - a valid web color, which can be specified by name, as a hex triplet (#rrbbgg), or rgb triplet (rgb(0–255,0–255,0–255)). In the case of political parties, most will have their logo color available in {{political party/meta/color}} templates.",
"default": "#
"type": "string/line",
"required": false,
Line 89 ⟶ 91:
"type": "string/line",
"required": false
},
"border": {
"label": "Border color",
"description": "The color of the border, or 'none' for no border",
"default": "#AAAAAA",
"type": "string/line",
"required": false,
"aliases": ["border-color"]
},
"width": {
"label": "Width",
"description": "The width of the bar
"default": "
"type": "string/line",
"required": false
|