More actions
Content deleted Content added
Alistair3149 (talk | contribs) Add class param Tag: 2017 source edit |
Alistair3149 (talk | contribs) No edit summary Tag: 2017 source edit |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<span class="template-badge{{#if:{{{ |
<span class="template-badge {{{class|}}}" style="{{#if:{{{bg|}}}|background:{{{bg}}};}}{{#if:{{{color|}}}|color:{{{color}}};}}">{{{1}}}</span><templatestyles src="Template:Badge/styles.css"/><noinclude>{{/doc}}</noinclude> |
Latest revision as of 06:23, 3 July 2024
{{{1}}}
This documentation is transcluded from Template:Badge/doc. Changes can be proposed in the talk page.
This template is used to style text as a badge.
Usage
{{Badge|Lando's favourite ship}}
gives Lando's favourite ship
{{Badge|Lando's favourite ship|color=#666}}
gives Lando's favourite ship
{{Badge|Lando's favourite ship|bg=#d0817d}}
gives Lando's favourite ship
{{Badge|Lando's favourite ship|bg=#d0817d|color=#222}}
gives Lando's favourite ship
TemplateData
Style text as a badge
Parameter | Description | Type | Status | |
---|---|---|---|---|
Text | 1 | Text in the badge | String | required |
Background color | bg | Background color of the badge (HEX/RGB(A)/HSL(A)) | String | optional |
Color | color | Color of the text on the badge
| String | optional |
HTML class | class | Additional HTML class | String | optional |
See also
- {{Transit}} - used for transit lines