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

From Twinsuniverse
Jump to: navigation, search
(added infobox)
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<includeonly>{{#switch: {{lc:{{{1|}}}}}
 
<includeonly>{{#switch: {{lc:{{{1|}}}}}
  |main=border-color:{{{b|#ccc}}}; background-color:{{{bg|#fff}}};
+
  | main = border-color:{{{b|#ccc}}}; background-color:{{{bg|#fff}}};
  |head=border-color:{{{b|#ccc}}}; background-color:{{{bgh|#ccf}}}; color:{{{txt|#000}}};
+
  | head = border-color:{{{b|#ccc}}}; background-color:{{{bgh|#ccf}}}; color:{{{txt|#000}}};
  |data=border-color:{{{b|#ccc}}};
+
| lead = border-color:{{{b|#ccc}}}; background-color:{{{bg|#fff}}};  color:{{{txt|#000}}};
}}</includeonly><noinclude>
+
  | data = border-color:{{{b|#ccc}}};
This template produces one of three styles for particular <nowiki>{{</nowiki>[[Template:infobox/themes|infobox/themes]]<nowiki>}}</nowiki>, in the form of CSS.
+
| #default:
 +
}}</includeonly><noinclude>{{Infobox Template
 +
|purpose=infobox
 +
|singletag=no
 +
|multiline=no
 +
|gamerelated=no
 +
|suppressible=
 +
|choice=
 +
|cat1=
 +
|var1=
 +
}}
 +
 
 +
This template produces one of four styles for particular {{templatelink|infobox/themes}}, in the form of CSS.
  
 
==Parameters==
 
==Parameters==
Line 17: Line 29:
  
  
This template would then output style for either of the following parameters for the <nowiki>{{</nowiki>[[Template:Infobox/core|Infobox/core]]<nowiki>}}</nowiki> template:
+
# The particular style that should be formed is also required (no parameter name, case insensitive), should be one of the following:
* '''mainstyle''': The theme style for the infobox' main table
+
#* ''main'' (the infobox' main table style)
* '''headstyle''': The theme style for the infobox' headers (title, subtitle, headings)
+
#* ''head'' (the infobox' default header style; title, subtitle and labels)
* '''datastyle''': The theme style for the infobox' plain data cells
+
#* ''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==
 
==Syntax==
  <nowiki>{{safesubst:Infobox/theme
+
  <nowiki>{{Infobox/themes/style|style
 
  |b=
 
  |b=
 
  |bg=
 
  |bg=
Line 31: Line 45:
  
 
==Example==
 
==Example==
  <nowiki>{{safesubst:Infobox/theme
+
  <nowiki>{{Infobox/themes/style|main
 
  |b=red
 
  |b=red
 
  |bg=#efe
 
  |bg=#efe
Line 38: Line 52:
 
}}</nowiki>
 
}}</nowiki>
  
The output would be pure CSS, acceptable for the HTML '''style''' attribute.
+
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]]
 
 
</noinclude>
 
</noinclude>

Latest revision as of 22:31, 4 June 2014

Infobox/themes/style
Purpose

Infobox [list all]

Single tag

No [list all]

Multi-line

No [list all]

Protected

No [list all]

Game related

No [list all]

Categorization
Categories

none [list all]

Variables
Names

none [list all]

Subpages

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.