Template:Colored box/doc
| This is a documentation subpage for Template:Colored box. It contains usage information, categories and other content that is not part of the original template page. |
| This template uses TemplateStyles: |
This template is for community pages
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| background-content-color | background-content-color | no description | Unknown | optional |
| extra classes | class | Extra CSS classes to apply to the outermost box (space-separated). This is mainly for other templates using TemplateStyles so that they can scope their CSS to the box, but it may be useful in other cases as well. | Line | optional |
| extra styles | style | Extra inline CSS rules to apply to the outermost element. Prefer TemplateStyles and using CSS classes if possible when using this template in another template. | Line | optional |
| background-title-color | background-title-color | no description | Unknown | optional |
| icon | icon | no description | File | optional |
| Title text | title | no description | String | required |
| Title link | title-link | Turn title area into a clickable link | Page name | optional |
| title-color | title-color | no description | String | optional |
| view-link | view-link link | Create a "view" corner link to a given page. | Page name | optional |
| view-extlink | view-extlink link2 | Create a "view" corner link to a external URL. This cannot be used together with "view-link". | URL | optional |
| view-text | view-text | Replace link text for "view-link" with something other than "view". | String | optional |
| link-color | link-color | no description | Unknown | optional |
| Content | content | no description | Content | required |
Examples
Example: Title
{{Colored box|title=TITLE|content=CONTENT}}
{{Colored box
|title=TITLE
|title-link=MediaWiki
|content=CONTENT
}}
CONTENT
CONTENT
Example: View link
{{Colored box|title=TITLE|view-link=MediaWiki|content=CONTENT}}
{{Colored box|title=TITLE|view-link=MediaWiki|view-text=HELLO|content=CONTENT}}
{{Colored box|title=TITLE|view-extlink=https://mediawiki.org|view-text=HELLO|content=CONTENT}}
CONTENT
CONTENT
CONTENT
Example: Everything
Icon, title link, custom view-link text
{{Colored box
|icon=OOjs_UI_icon_download-progressive.svg
|title=TITLE
|title-link=MediaWiki
|view-link=MediaWiki
|view-text=HELLO
|content=CONTENT
}}
See also
- This template is imported from mw:Template:Colored box.
- This template was originally based on w:en:Template:Colored box.