Template:Capsule: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 2: Line 2:
<onlyinclude><includeonly><!-->
<onlyinclude><includeonly><!-->
--><div class="capsule" style="background:{{{capbg|transparent}}};-moz-border-radius:5px;-webkit-border-radius:5px;-khtml-border-radius:5px;border-radius:5px"><!--
--><div class="capsule" style="background:{{{capbg|transparent}}};-moz-border-radius:5px;-webkit-border-radius:5px;-khtml-border-radius:5px;border-radius:5px"><!--
--><div class="capcontent" style="background:{{{contbg|transparent}}};padding:6px">{{{1}}}</div><!--
--><div class="capcontent" style="background:{{{contbg|transparent}}};padding:6px"><p>{{{1}}}</p></div><!--
--></div>
--></div>
</includeonly></onlyinclude>{{doc}}
</includeonly></onlyinclude>{{doc}}

Revision as of 23:24, 9 December 2022

English (en)Deutsch (de)Esperanto (eo)Español (es)Français (fr)Suomi (fi)Hrvatski (hr)Magyar (hu)Italiano (it)日本語 (ja)한국어 (ko)Nederlands (nl)Polski (pl)Português (pt)Português do Brasil (pt-br)Русский (ru)Slovenčina (sk)Svenska (sv)Türkçe (tr)Українська (uk)Tiếng Việt (vi)中文 (zh)中文(臺灣) (zh-tw)
Curly brackets white.pngTemplate Documentation [view] [edit]
Icon-translate.png Available doc translations
View
Page history

This template is designed to add a block with rounded corners with text inside.

Parameters and Examples

Parameter Description Example Preview
No parameters Reverts to default styling
{{Capsule}}

{{{1}}}

{{{1}}} or {{{text}}} For text input
{{Capsule|Hello, world!}}
{{Capsule|text=Hello, world!}}

Hello, world!

Styling parameters
{{{align}}} For specifying text alignment
{{Capsule|Hello, world!|align=left}}
{{Capsule|Hello, world!|align=center}}
{{Capsule|Hello, world!|align=right}}

Hello, world!

Hello, world!

Hello, world!

{{{bg}}} Background value
{{Capsule|bg=#294157}}

{{{1}}}

{{{radius}}} For setting the border radius
{{Capsule|radius=1em}}

{{{1}}}

{{{padding}}} Padding value
{{Capsule|padding=2em}}

{{{1}}}

{{{margin}}} Margin value
{{Capsule|margin=0 1em}}

{{{1}}}

{{{height}}} For specifying capsule height
{{Capsule|height=100px}}

{{{1}}}

{{{style}}} Used to change preset styling of the capsule.
{{Capsule|style=1}}
{{Capsule|style=2}}
{{Capsule|style=3}}

{{{1}}}

{{{1}}}

{{{1}}}