Global Lua Modules/Cbox

Cbox is a module for creating message boxes with rounded corner.

Features

 * Highly customizable with classes, inline styles, and provided CSS selectors.
 * Optional features such as an image, reason, addable layout, and auto coloring.

Module
First thing is the module itself. You don't need to copy the code. Just create a module titled Module:Cbox (or any other—just remember to adjust  calls) and put this in the code

CSS
Next, add the following to your Common.css or Wikia.css.

Unlike Mbox, non-spacing class code to add sharing design. For more about, see.

The following CSS represents the base, and can be found at MediaWiki:Global Lua Modules/Cbox.css.

Template
The module is designed to be used as a regular template. To do that just create a template (ex: Template:Cbox) with following content:

Now the template you created will accept parameters documented below.

These parameters can also be passed directly to the  and will act as defaults. Their values will be overridden by same ones passed to the template.

Parameters
For examples of how to use these parameters, see.

Parameters with " #"
Other CSS-patamaters are spliced with " #". Right parameter is used for location and default is root  element. Below are element that can use auto coloring. For more about, see. <!--

Design
Some communities may wish to customize the appearance of the mboxes. The most common styling options are provided below:


 * Technical notes
 * The mbox module uses the BEM selector convention for readability and to make future additions to the HTML structure easier.
 * Additional inline styles to the root  element can be achieved via the   parameter in the template.

Basic mbox
Produces:

Using types
To use types, CSS variables must be added, such as:

If added:

Produces:

Image
Produces:

Aside
Produces:

Bit of everything
Produces:

Standard/default style
Produces:

Wookieepedia style
Reproducing w:c:starwars:Template:Citation.

 .mbox { background-color: #7bb0d8; border: none; border-radius: 10px; } .mbox__close { color: #0c8787; font-weight: normal; font-size: 13px; } .mbox__close:after { content: '[hide]'; } .mw-collapsed + .mbox__close { transform: none; padding: 2px 7px; } .mw-collapsed + .mbox__close:after { content: '[show]'; }
 * CSS:

Final Fantasy Wiki style
Reproducing w:c:finalfantasy:Template:Rename.

 .mbox { background-color: #0000a8; border: 4px ridge #c0c0c0; border-radius: 10px; color: #fff; } -->
 * CSS:

Technical and miscellaneous

 * There is no  parameter too. In order to inject a category onto an article using a certain mbox implementation, simply add  . If you wish to make the injection of the category optional, add.