Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Please sign up or log in to edit the wiki.
Content deleted Content added
No edit summary
Tag: 2017 source edit
No edit summary
Tag: 2017 source edit
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<span class="template-badge{{#if:{{{class|}}}|{{nbsp}}{{{class}}}}}" {{#if:{{{bg|}}}|style="background:{{{bg}}};"}}>{{{1}}}</span><templatestyles src="Template:Badge/styles.css"/><noinclude>{{/doc}}</noinclude>
<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}}}

Template documentation[view][edit][history][purge]
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

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Text1

Text in the badge

Stringrequired
Background colorbg

Background color of the badge (HEX/RGB(A)/HSL(A))

Stringoptional
Colorcolor

Color of the text on the badge

Example
#000
Stringoptional
HTML classclass

Additional HTML class

Stringoptional

See also

  • {{Transit}} - used for transit lines