Difference between revisions of "Template:BaseInfoBox"
From DoomWiki.org
m (Needs overflow: auto) |
(Also needs a max-width property.) |
||
Line 1: | Line 1: | ||
<div class="boilerplate {{#if:{{{classes|}}}|{{{classes}}}|}}" {{#if:{{{id|}}}|id="{{{id}}}"|}} | <div class="boilerplate {{#if:{{{classes|}}}|{{{classes}}}|}}" {{#if:{{{id|}}}|id="{{{id}}}"|}} | ||
− | style="overflow: auto; {{#if:{{{width|}}}|width: {{{width}}};|}} | + | style="overflow: auto; max-width: 90%; {{#if:{{{width|}}}|width: {{{width}}};|}} |
margin: {{#if:{{{margins|}}}|{{{margins}}}|0 auto 2em auto}}; | margin: {{#if:{{{margins|}}}|{{{margins}}}|0 auto 2em auto}}; | ||
text-align: {{#if:{{{textalign|}}}|{{{textalign}}}|center}}; | text-align: {{#if:{{{textalign|}}}|{{{textalign}}}|center}}; | ||
Line 46: | Line 46: | ||
* {{c|classes}}: Extra CSS class(es) to apply. "boilerplate" is always applied. | * {{c|classes}}: Extra CSS class(es) to apply. "boilerplate" is always applied. | ||
* {{c|id}}: HTML entity id to apply; default none. This should be unique per descendent template. | * {{c|id}}: HTML entity id to apply; default none. This should be unique per descendent template. | ||
− | * {{c|width}}: CSS width to apply. Default is unspecified and will fill the article width minus the default margins. | + | * {{c|width}}: CSS width to apply. Default is unspecified and will fill the article width minus the default margins. Will not exceed 90% of article width. |
* {{c|margins}}: CSS margins. Default: 0 auto 1.5em auto. Do '''not''' include whitespace, br tags, etc after a descendant template transclusion! Change the bottom margin instead if extra space between the box and article content is desired. | * {{c|margins}}: CSS margins. Default: 0 auto 1.5em auto. Do '''not''' include whitespace, br tags, etc after a descendant template transclusion! Change the bottom margin instead if extra space between the box and article content is desired. | ||
* {{c|textalign}}: CSS text alignment. Default is center. | * {{c|textalign}}: CSS text alignment. Default is center. |
Revision as of 21:53, 13 May 2014
Documentation
Base class template for article-top information boxes.
Parameters
- icon: Name of a file to display as an icon (optional). If provided, iconpos and iconsize are required. Must be floating if tc is specified.
- iconsize: Size of icon. Required if an icon is specified.
- iconpos: Floating or inline position of icon. Required if an icon is specified.
- classes: Extra CSS class(es) to apply. "boilerplate" is always applied.
- id: HTML entity id to apply; default none. This should be unique per descendent template.
- width: CSS width to apply. Default is unspecified and will fill the article width minus the default margins. Will not exceed 90% of article width.
- margins: CSS margins. Default: 0 auto 1.5em auto. Do not include whitespace, br tags, etc after a descendant template transclusion! Change the bottom margin instead if extra space between the box and article content is desired.
- textalign: CSS text alignment. Default is center.
- padding: CSS padding inside infobox. Default: 0 1em.
- border: CSS border styling. Default: 1px solid. Do not include color; color is determined by the colorscheme parameter.
- colorscheme: Determines background and border color. Possible values:
- info: Baby blue
- warning: Warning red
- dead: Dead gray
- parchment: Parchment tan. This is the default.
- royalblue: Royal blue
- easter: Easter egg
- purple: Purple
- textstyle: CSS style to apply to text. Default none.
- content: Place content of descendent template here.
- tc: Alternatively to use of content, specify tc to transclude the contents of another document into this template's content area.