More actions
Content deleted Content added
Alistair3149 (talk | contribs) Created page with "<span class="template-badge" {{#if:{{{bg|}}}|style="background:{{{bg}}};"}}>{{{1}}}</span><templatestyles src="Template:Badge/styles.css"/><noinclude>{{/doc}}</noinclude>" Tag: 2017 source edit |
Alistair3149 (talk | contribs) Add class param Tag: 2017 source edit |
||
Line 1: | Line 1: | ||
<span class="template-badge" {{#if:{{{bg|}}}|style="background:{{{bg}}};"}}>{{{1}}}</span><templatestyles src="Template:Badge/styles.css"/><noinclude>{{/doc}}</noinclude> |
<span class="template-badge{{#if:{{{class|}}}| {{{class}}}}}" {{#if:{{{bg|}}}|style="background:{{{bg}}};"}}>{{{1}}}</span><templatestyles src="Template:Badge/styles.css"/><noinclude>{{/doc}}</noinclude> |
Revision as of 21:42, 9 May 2022
{{{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