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

From Twinsuniverse
Jump to: navigation, search
m
m (simplified explanation a bit)
Line 20: Line 20:
  
 
# The particular style that should be formed is also required (no parameter name, case insensitive), should be one of the following:
 
# The particular style that should be formed is also required (no parameter name, case insensitive), should be one of the following:
#* ''main''
+
#* ''main'' (the infobox' main table style)
#* ''head''
+
#* ''head'' (the infobox' default header style; title, subtitle and labels)
#* ''lead''
+
#* ''lead'' (the infobox' alternate header style; heading)
#* ''data''
+
#* ''data'' (the infobox' plain data cell style)
 
#* any other value results in an empty string as output.
 
#* any other value results in an empty string as output.
 
 
This template would then output style for either of the following parameters for the {{templatelink|Infobox/core}} template:
 
* '''mainstyle''': The theme style for the infobox' main table
 
* '''headstyle''': The theme style for the infobox' default headers (title, subtitle, labels)
 
* '''leadstyle''': The theme style for the infobox' alternate header (heading)
 
* '''datastyle''': The theme style for the infobox' plain data cells
 
  
 
==Syntax==
 
==Syntax==
Line 49: Line 42:
 
}}</nowiki>
 
}}</nowiki>
  
The output would be pure CSS, acceptable for the HTML '''style''' attribute, in this case the specific attributes required for the 'main' element.
+
The output would be pure CSS, acceptable for the HTML '''style''' attribute, in this example the specific attributes required for the 'main' element.
  
 
[[Category:System Templates]]
 
[[Category:System Templates]]
 
</noinclude>
 
</noinclude>

Revision as of 08:27, 27 May 2014

This template produces one of four 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.


  1. The particular style that should be formed is also required (no parameter name, case insensitive), should be one of the following:
    • main (the infobox' main table style)
    • head (the infobox' default header style; title, subtitle and labels)
    • lead (the infobox' alternate header style; heading)
    • data (the infobox' plain data cell style)
    • any other value results in an empty string as output.

Syntax

{{Infobox/themes/style|style
 |b=
 |bg=
 |bgh=
 |txt=
}}

Example

{{Infobox/themes/style|main
 |b=red
 |bg=#efe
 |bgh=#ababab
 |txt=rgb(50,60,70)
}}

The output would be pure CSS, acceptable for the HTML style attribute, in this example the specific attributes required for the 'main' element.