Template:Legend sliced

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Template documentationview · edit · history · purge ]
This documentation is transcluded from Template:Legend sliced/doc.

This template can be used to create a map legend entry with a diagonally split two-colored box, which may be used to represent striped regions on a map. The box size is about 32×21px and cannot be altered. Complementary to the one-color Template:Legend and Template:Legend inline.

This template is similar to Template:Legend striped except that the label is not highlighted and the box size is set to match that of Template:Legend.

Usage[edit]

Call this template with three positional parameters to produce a two-colored box followed by some text. For example,

{{Legend sliced|blue|yellow|Lorem ipsum}}

produces

  Lorem ipsum

There also exist several optional parameters that can be used to customize the appearance. The full list of parameters is as follows:

  • The first and second parameters (top color and bottom color) are passed to the css background-color property of the color box.
  • The third parameter (label) adds text to the right of the box. Text may be ''italic'', '''bold''', or [[wikilinked]] as well.
  • inline can be set to any value to make the box and label to appear in a paragraph rather than on their own line.
  • border sets the css description of the border that will be drawn around the box. Defaults to thin solid #333.
  • up can be set to any value to make the diagonal line go from bottom left to top right. If it is not passed the line will go from top left to bottom right.

Examples[edit]

Wikitext Appearance
{{Legend|gold|Earth Kingdom}}
{{Legend|red|Fire Nation}}
{{Legend sliced|gold|red|Fire Nation colonies}}
 
Earth Kingdom
 
Fire Nation
  Fire Nation colonies
{{Legend sliced|green|blue|Wet|inline=yes}} {{Legend sliced|yellow|orange|Dry|inline=yes}}
  Tropical   Dry
{{Legend sliced|#070|#fc0|Brazil|up=yes}}
  Brazil
{{Legend sliced|#003b7b|white|'''Portugal'''|border=2px solid black}}
  Portugal

Localization[edit]

This template is not intended to be localized.

Compatibility[edit]

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.

See also[edit]