Template:BubbleBox: Difference between revisions
(→Parameters: TemplateData extension) |
(Documentation template) |
||
| Line 1: | Line 1: | ||
<includeonly><div class="{{#ifeq:{{{background|}}}|bubbles|bubbleboxbg|{{{background}}}}} {{#if:{{{collapsed|}}}|mw-collapsible}} {{#ifeq:{{{collapsed|}}}|true|mw-collapsed}} {{{tags|}}}" style="color:box-shadow: 0px 0px 15px #ffffff inset; border-width: 10px 5px 5px 5px; border-style: solid; border-color: rgb({{#if:{{{border|}}}|{{{border}}}|{{SiteColor|Generic}}}}); border-radius: 10px; padding: 15px; margin: 4px; {{#ifeq:{{{background|}}}|bubbles||background-color: {{#if:{{{background|}}}|{{{background}}}|rgba({{#if:{{{border|}}}|{{{border}}}|{{SiteColor|Generic}}}}, 0.25)}};}} {{{style|}}}">{{#if:{{{collapsed|}}}|{{{1}}}<div class="mw-collapsible-content">|{{#ifeq:{{{1|}}}|open||{{{1}}}</div>}}}}</includeonly><noinclude | <includeonly><div class="{{#ifeq:{{{background|}}}|bubbles|bubbleboxbg|{{{background}}}}} {{#if:{{{collapsed|}}}|mw-collapsible}} {{#ifeq:{{{collapsed|}}}|true|mw-collapsed}} {{{tags|}}}" style="color:box-shadow: 0px 0px 15px #ffffff inset; border-width: 10px 5px 5px 5px; border-style: solid; border-color: rgb({{#if:{{{border|}}}|{{{border}}}|{{SiteColor|Generic}}}}); border-radius: 10px; padding: 15px; margin: 4px; {{#ifeq:{{{background|}}}|bubbles||background-color: {{#if:{{{background|}}}|{{{background}}}|rgba({{#if:{{{border|}}}|{{{border}}}|{{SiteColor|Generic}}}}, 0.25)}};}} {{{style|}}}">{{#if:{{{collapsed|}}}|{{{1}}}<div class="mw-collapsible-content">|{{#ifeq:{{{1|}}}|open||{{{1}}}</div>}}}}</includeonly><noinclude> | ||
{{Documentation}} | |||
{ | |||
</noinclude> | </noinclude> | ||
Latest revision as of 19:32, 1 May 2026
| Template documentation follows |
|---|
| Visit Template:BubbleBox/doc to edit this documentation. (How does this work?) |
| Editors can experiment in this template's sandbox and test case pages. |
Produces a site-standard content container.
Parameters
No description.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| content | content | The content of the container, or "open" to leave the container as an unterminated <div> element.
| Unknown | optional |
| border | border | An RGB triplet to use as the border color of the container. The default color is 192, 192, 192, defined in Template:SiteColor as "Generic".
| Unknown | optional |
| background | background | A CSS color value to use as the background for the content portion of the container, or "bubbles" for the site-standard bubble background. The default color is rgba([border], 0.25).
| Unknown | optional |
| style | style | A CSS property list to apply to the container. | Unknown | optional |
| collapsed | collapsed | If present, the container becomes collapsible and two nested, unterminated <div> elements. [content] parameter will appear before the collapsible region. Must be one of the following: "true" - The collapsible region is collapsed by default. "false" - The collapsible region is expanded by default.
| Unknown | optional |
| tags | tags | If present, the given tag names will be added to the element. This is useful only for back-end JavaScript purposes. | Unknown | optional |
Example
Markup
{{BubbleBox|background=rgba({{SiteColor|Abyssal}}, 0.25)|border={{SiteColor|Sol}}|Sample text 1}}
{{BubbleBox|Sample text 2}}
{{BubbleBox|border={{SiteColor|Metropolis}}|Sample text 3}}
{{BubbleBox|open|background=stripes|border={{SiteColor|Luna}}}}Sample text 4</div>
{{BubbleBox|background=bubbles|collapsed=false|border=40,80,120|Static content}}Collapsible content</div></div>
