Difference between revisions of "Template:Infobox/themes/style"

From Twinsuniverse
Jump to: navigation, search
m
Line 4: Line 4:
 
  |data=border-color:{{{b|#ccc}}};
 
  |data=border-color:{{{b|#ccc}}};
 
}}</includeonly><noinclude>
 
}}</includeonly><noinclude>
This template produces the appropriate theme for an <nowiki>{{</nowiki>[[Template:Infobox|infobox]]<nowiki>}}</nowiki>, by wrapping the specified values into dynamic parameters for the calling template-call.
+
This template produces one of three styles for particular <nowiki>{{</nowiki>[[Template:infobox/themes|infobox/themes]]<nowiki>}}</nowiki>, in the form of CSS.
  
In simpler terms, this template tells another template how to make a particular theme, using the specified values.
+
==Parameters==
 +
This template uses abbreviated parameter names, to allow for short single lines when calling this template repetitively.
 +
* '''b''': The '''b'''order colour
 +
* '''bg''': The main '''b'''ack'''g'''round colour
 +
* '''bgh''': The '''b'''ack'''g'''round colour of '''h'''eaders
 +
* '''txt''': The '''t'''e'''xt''' colour in headers
  
{{stub}}
 
{{mbox|class=notice|This template has been completely altered and so this page needs a rewrite.}}
 
  
==Parameters==
+
'''''Note''': The colours may be in any CSS accepted format, that is #RGB, #RRGGBB, rgb(xxx,xxx,xxx) or string literal.''
This template uses abbreviated parameter names, to allow for short(er) lines of code in the <nowiki>{{</nowiki>[[Template:Infobox/themes|Infobox/themes]]<nowiki>}}</nowiki> template, where all themes are specified per line.
+
* '''b''': The colour of the '''b'''order
+
* '''bg''': The colour of the main '''b'''ack'''g'''round
+
* '''bgh''': The colour of the '''b'''ack'''g'''round of '''h'''eadings
+
* '''txt''': The colour of '''t'''e'''xt''' in headings
+
  
This template also outputs the following parameters upon use to the calling template-call:
+
 
 +
This template would then output style for either of the following parameters for the <nowiki>{{</nowiki>[[Template:Infobox/core|Infobox/core]]<nowiki>}}</nowiki> template:
 
* '''mainstyle''': The theme style for the infobox' main table
 
* '''mainstyle''': The theme style for the infobox' main table
* '''headstyle''': The theme style for the infobox' headings (title, subtitle, headings)
+
* '''headstyle''': The theme style for the infobox' headers (title, subtitle, headings)
 
* '''datastyle''': The theme style for the infobox' plain data cells
 
* '''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==
 
==Syntax==
Line 34: Line 28:
 
  |bgh=
 
  |bgh=
 
  |txt=
 
  |txt=
|icon=
 
 
}}</nowiki>
 
}}</nowiki>
  
Line 43: Line 36:
 
  |bgh=#ababab
 
  |bgh=#ababab
 
  |txt=rgb(50,60,70)
 
  |txt=rgb(50,60,70)
|icon=/images/6/6e/Orb_grey30.png
 
 
}}</nowiki>
 
}}</nowiki>
  
The result would be a custom theme for an infobox.
+
The output would be pure CSS, acceptable for the HTML '''style''' attribute.
  
 
[[Category:System Templates]]
 
[[Category:System Templates]]
[[Category:Infoboxes| ]]
 
 
</noinclude>
 
</noinclude>

Revision as of 22:00, 9 January 2013

This template produces one of three styles for particular {{infobox/themes}}, in the form of CSS.

Parameters

This template uses abbreviated parameter names, to allow for short single lines when calling this template repetitively.

  • b: The border colour
  • bg: The main background colour
  • bgh: The background colour of headers
  • txt: The text colour in headers


Note: The colours may be in any CSS accepted format, that is #RGB, #RRGGBB, rgb(xxx,xxx,xxx) or string literal.


This template would then output style for either of the following parameters for the {{Infobox/core}} template:

  • mainstyle: The theme style for the infobox' main table
  • headstyle: The theme style for the infobox' headers (title, subtitle, headings)
  • datastyle: The theme style for the infobox' plain data cells

Syntax

{{safesubst:Infobox/theme
 |b=
 |bg=
 |bgh=
 |txt=
}}

Example

{{safesubst:Infobox/theme
 |b=red
 |bg=#efe
 |bgh=#ababab
 |txt=rgb(50,60,70)
}}

The output would be pure CSS, acceptable for the HTML style attribute.