Template:Capsule/doc: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 19: | Line 19: | ||
| {{CodeBlock|<nowiki>{{Capsule|Hello, world!}}</nowiki>}} {{CodeBlock|<nowiki>{{Capsule|text=Hello, world!}}</nowiki>}} | | {{CodeBlock|<nowiki>{{Capsule|Hello, world!}}</nowiki>}} {{CodeBlock|<nowiki>{{Capsule|text=Hello, world!}}</nowiki>}} | ||
| {{Capsule|Hello, world!}} | | {{Capsule|Hello, world!}} | ||
|- | |||
! colspan=4 | Styling parameters | |||
|- | |- | ||
| align="center" | {{code|{{param|align}}}} | | align="center" | {{code|{{param|align}}}} | ||
| Line 24: | Line 26: | ||
| {{CodeBlock|<nowiki>{{Capsule|Hello, world!|align=left}}</nowiki>}} {{CodeBlock|<nowiki>{{Capsule|Hello, world!|align=center}}</nowiki>}} {{CodeBlock|<nowiki>{{Capsule|Hello, world!|align=right}}</nowiki>}} | | {{CodeBlock|<nowiki>{{Capsule|Hello, world!|align=left}}</nowiki>}} {{CodeBlock|<nowiki>{{Capsule|Hello, world!|align=center}}</nowiki>}} {{CodeBlock|<nowiki>{{Capsule|Hello, world!|align=right}}</nowiki>}} | ||
| {{Capsule|Hello, world!|align=left}} {{Capsule|Hello, world!|align=center}} {{Capsule|Hello, world!|align=right}} | | {{Capsule|Hello, world!|align=left}} {{Capsule|Hello, world!|align=center}} {{Capsule|Hello, world!|align=right}} | ||
|- | |- | ||
| align="center" | {{code|{{param|bg}}}} | | align="center" | {{code|{{param|bg}}}} | ||
| Line 31: | Line 31: | ||
| {{CodeBlock|<nowiki>{{Capsule|bg=#294157}}</nowiki>}} | | {{CodeBlock|<nowiki>{{Capsule|bg=#294157}}</nowiki>}} | ||
| {{Capsule|bg=#294157}} | | {{Capsule|bg=#294157}} | ||
|- | |||
| align="center" | {{code|{{param|radius}}}} | |||
| For setting the border radius | |||
| {{CodeBlock|<nowiki>{{Capsule|radius=1em}}</nowiki>}} | |||
| {{Capsule|radius=1em}} | |||
|- | |||
| align="center" | {{code|{{param|padding}}}} | |||
| Padding value | |||
| {{CodeBlock|<nowiki>{{Capsule|padding=2em}}</nowiki>}} | |||
| {{Capsule|padding=2em}} | |||
|- | |||
| align="center" | {{code|{{param|margin}}}} | |||
| Margin value | |||
| {{CodeBlock|<nowiki>{{Capsule|margin=0 1em}}</nowiki>}} | |||
| {{Capsule|margin=0 1em}} | |||
|- | |||
| align="center" | {{code|{{param|height}}}} | |||
| For specifying capsule height | |||
| {{CodeBlock|<nowiki>{{Capsule|height=100px}}</nowiki>}} | |||
| {{Capsule|height=100px}} | |||
|- | |- | ||
| align="center" | {{code|{{param|style}}}} | | align="center" | {{code|{{param|style}}}} | ||
Latest revision as of 18:27, 23 July 2023
This is a documentation subpage for Template:Capsule.
Don't forget to purge the contents of the base page upon creating or editing this subpage.
Don't forget to purge the contents of the base page upon creating or editing this subpage.
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 | ||
{{{1}}} or {{{text}}}
|
For text input | Hello, world!
| |
| Styling parameters | |||
{{{align}}}
|
For specifying text alignment | Hello, world! Hello, world! Hello, world!
| |
{{{bg}}}
|
Background value | ||
{{{radius}}}
|
For setting the border radius | ||
{{{padding}}}
|
Padding value | ||
{{{margin}}}
|
Margin value | ||
{{{height}}}
|
For specifying capsule height | ||
{{{style}}}
|
Used to change preset styling of the capsule. | ||