Difference between revisions of "Template:Legend striped/doc"

From Ava Zinn Wiki
Jump to: navigation, search
[unchecked revision][unchecked revision]
(creating template doc page)
 
(taking my sandbox out here!)
Line 5: Line 5:
  
 
==Usage==
 
==Usage==
  <nowiki>{{</nowiki>User:Patrickneil/Striped legend|''first color''|''second color''|''label''|outline=''outline color''|border=''css border''<nowiki>}}</nowiki>
+
  <nowiki>{{</nowiki>Legend striped|''first color''|''second color''|''label''|outline=''outline color''|border=''css border''<nowiki>}}</nowiki>
  
 
*''first color'' and ''second color'' are passed to the [[Cascading Style Sheets|css]] background-color property of the color box. These fields are required. ''first color'' is always the top color.
 
*''first color'' and ''second color'' are passed to the [[Cascading Style Sheets|css]] background-color property of the color box. These fields are required. ''first color'' is always the top color.
Line 20: Line 20:
 
==Examples==
 
==Examples==
 
===Typical use===
 
===Typical use===
  <nowiki>{{User:Patrickneil/Striped legend|black|gray|Raiders}}</nowiki>
+
  <nowiki>{{Legend striped|black|gray|Raiders}}</nowiki>
  <nowiki>{{User:Patrickneil/Striped legend|green|gold|Packers}}</nowiki>
+
  <nowiki>{{Legend striped|green|gold|Packers}}</nowiki>
  <nowiki>{{User:Patrickneil/Striped legend|maroon|gold|''Redskins''|up=yes}}</nowiki>
+
  <nowiki>{{Legend striped|maroon|gold|''Redskins''|up=yes}}</nowiki>
  <nowiki>{{User:Patrickneil/Striped legend|#003b7b|#fff|Colts|outline=silver}}</nowiki>
+
  <nowiki>{{Legend striped|#003b7b|#fff|Colts|outline=silver}}</nowiki>
  <nowiki>{{User:Patrickneil/Striped legend|#c80815|#e6be8a|'''49ers'''|border=2px solid black}}</nowiki>
+
  <nowiki>{{Legend striped|#c80815|#e6be8a|'''49ers'''|border=2px solid black}}</nowiki>
  
{{User:Patrickneil/Striped legend|black|gray|Raiders}}
+
{{Legend striped|black|gray|Raiders}}
{{User:Patrickneil/Striped legend|green|gold|Packers}}
+
{{Legend striped|green|gold|Packers}}
{{User:Patrickneil/Striped legend|maroon|gold|''Redskins''|up=yes}}
+
{{Legend striped|maroon|gold|''Redskins''|up=yes}}
{{User:Patrickneil/Striped legend|#003b7b|#fff|Colts|outline=silver}}
+
{{Legend striped|#003b7b|#fff|Colts|outline=silver}}
{{User:Patrickneil/Striped legend|#c80815|#e6be8a|'''49ers'''|border=2px solid black}}
+
{{Legend striped|#c80815|#e6be8a|'''49ers'''|border=2px solid black}}
  
 
===Advanced use===
 
===Advanced use===
  <nowiki>{{User:Patrickneil/Striped legend|#0c2340|#a2aaad|size=2em|border=3px solid #78be20|Seahawks}}</nowiki>
+
  <nowiki>{{Legend striped|#0c2340|#a2aaad|size=2em|border=3px solid #78be20|Seahawks}}</nowiki>
  <nowiki>{{User:Patrickneil/Striped legend|white|gold|text=&amp;nbsp;'''R'''|textcolor=maroon|Redskins}}</nowiki>
+
  <nowiki>{{Legend striped|white|gold|text=&amp;nbsp;'''R'''|textcolor=maroon|Redskins}}</nowiki>
  
{{User:Patrickneil/Striped legend|#0c2340|#a2aaad|size=2em|border=3px solid #78be20|Seahawks}}
+
{{Legend striped|#0c2340|#a2aaad|size=2em|border=3px solid #78be20|Seahawks}}
{{User:Patrickneil/Striped legend|white|gold|text=&nbsp;'''R'''|textcolor=maroon|Redskins}}
+
{{Legend striped|white|gold|text=&nbsp;'''R'''|textcolor=maroon|Redskins}}
  
  

Revision as of 14:01, 12 June 2012

Shows a legend row with a two colored box. Complimentary to the one color legend template.

Usage

{{Legend striped|first color|second color|label|outline=outline color|border=css border}}
  • first color and second color are passed to the css background-color property of the color box. These fields are required. first color is always the top color.
  • label is optional, and adds text to the right of the box. Text may be '''bold''' or ''italic'' also.
  • The optional outline parameter is the color of the outline around the box.
  • If you need to customize the border further, you can use the border argument, which overrides the outline argument and sets the css description (e.g., 1px solid #aaa) of the border that will be drawn around the box.

Additionally, editors can specify several other optional fields:

  • size: sizes should be in terms of em, px, or pt. 1.5em is the default.
  • up: will make the diagonal line go from bottom left to top right.
  • text: will put one or two characters of text inside the box. If using one character, a non-breaking space (&nbsp;) will help center it. The color of this text may also be specified with the field textcolor. Will not work with up field.

Examples

Typical use

{{Legend striped|black|gray|Raiders}}
{{Legend striped|green|gold|Packers}}
{{Legend striped|maroon|gold|''Redskins''|up=yes}}
{{Legend striped|#003b7b|#fff|Colts|outline=silver}}
{{Legend striped|#c80815|#e6be8a|'''49ers'''|border=2px solid black}}
  Raiders
  Packers
  Redskins
  Colts
  49ers

Advanced use

{{Legend striped|#0c2340|#a2aaad|size=2em|border=3px solid #78be20|Seahawks}}
{{Legend striped|white|gold|text=&nbsp;'''R'''|textcolor=maroon|Redskins}}
  Seahawks
  R Redskins


Compatibility

Current compatibility issues are based on different browsers implementation of CSS protocol. These boxes, for example, may look too tall on mobile browsers. Please let the developers know on the talk page if there are issues.