Difference between revisions of "Template:Infobox/themes/style"
J McKalling (Talk | contribs) m (testing substitution for themestyles) |
J McKalling (Talk | contribs) (background images cannot be inserted by style attribute. fixed substitution for themestyles bug) |
||
Line 1: | Line 1: | ||
<includeonly>{{subst:#if: true | | <includeonly>{{subst:#if: true | | ||
{{safesubst:!}}tablestyle=border-color:{{{b|#ccc}}}; background-color:{{{bg|#fff}}}; | {{safesubst:!}}tablestyle=border-color:{{{b|#ccc}}}; background-color:{{{bg|#fff}}}; | ||
− | {{safesubst:!}}titlestyle=border-color:{{{b|#ccc}}}; background-color:{{{bgh|#ccf}}}; color:{{{txt|#000}}}; | + | {{safesubst:!}}titlestyle=border-color:{{{b|#ccc}}}; background-color:{{{bgh|#ccf}}}; color:{{{txt|#000}}}; |
+ | {{safesubst:!}}titleclass={{{class|}}}); | ||
{{safesubst:!}}headstyle=border-color:{{{b|#ccc}}}; background-color:{{{bgh|#ccf}}}; color:{{{txt|#000}}}; | {{safesubst:!}}headstyle=border-color:{{{b|#ccc}}}; background-color:{{{bgh|#ccf}}}; color:{{{txt|#000}}}; | ||
{{safesubst:!}}datastyle=border-color:{{{b|#ccc}}}; | {{safesubst:!}}datastyle=border-color:{{{b|#ccc}}}; | ||
Line 19: | Line 20: | ||
* '''bgh''': The colour of the '''b'''ack'''g'''round of '''h'''eadings | * '''bgh''': The colour of the '''b'''ack'''g'''round of '''h'''eadings | ||
* '''txt''': The colour of '''t'''e'''xt''' in headings | * '''txt''': The colour of '''t'''e'''xt''' in headings | ||
− | * ''' | + | * '''class''': The theme-icon-xxx class for giving the title heading a background-image |
This template also outputs the following parameters upon use to the calling template-call: | This template also outputs the following parameters upon use to the calling template-call: | ||
Line 30: | Line 31: | ||
'''''Note''': The colours may be in any CSS accepted format, that is #RGB, #RRGGBB, rgb(xxx,xxx,xxx) or string literal.'' | '''''Note''': The colours may be in any CSS accepted format, that is #RGB, #RRGGBB, rgb(xxx,xxx,xxx) or string literal.'' | ||
− | '''''Note''': To get | + | '''''Note''': To get an accepted value for the '''class''' parameter, look for the class names (in the form of "theme-icon-''color''") under INFOBOX THEME ICONS in [[MediaWiki:Common.css]].'' |
==Syntax== | ==Syntax== |
Revision as of 15:07, 6 January 2013
This template produces the appropriate theme for an {{infobox}}, by wrapping the specified values into dynamic parameters for the calling template-call.
In simpler terms, this template tells another template how to make a particular theme, using the specified values.
This template must be called using the safesubst: prefix, or it won't work.
This article is a stub [list all]. You can help the Twinsuniverse by expanding it. |
Parameters
This template uses abbreviated parameter names, to allow for short(er) lines of code in the {{Infobox/themes}} template, where all themes are specified per line.
- b: The colour of the border
- bg: The colour of the main background
- bgh: The colour of the background of headings
- txt: The colour of text in headings
- class: The theme-icon-xxx class for giving the title heading a background-image
This template also outputs the following parameters upon use to the calling template-call:
- tablestyle: The theme style for the infobox' table element
- titlestyle: The theme style for the infobox' title heading
- headstyle: The theme style for the infobox' headings (header and label)
- datastyle: The theme style for the infobox' plain data cells
Note: The colours may be in any CSS accepted format, that is #RGB, #RRGGBB, rgb(xxx,xxx,xxx) or string literal.
Note: To get an accepted value for the class parameter, look for the class names (in the form of "theme-icon-color") under INFOBOX THEME ICONS in MediaWiki:Common.css.
Syntax
{{safesubst:Infobox/theme |b= |bg= |bgh= |txt= |icon= }}
Example
{{safesubst:Infobox/theme |b=red |bg=#efe |bgh=#ababab |txt=rgb(50,60,70) |icon=/images/6/6e/Orb_grey30.png }}
The result would be a custom theme for an infobox.