Template:Legend striped
| This template uses TemplateStyles: |
Shows a legend row with a two colored box. Complementary to the one color legend template.
Usage
{{Legend striped|''top color''|''bottom color''|''label''|outline=''outline color''|border=''css border''}}
- top color and bottom color are passed to the css background-color property of the color box. These fields are required.
- label is optional, and adds text to the right of the box. Text may be ''italic'', '''bold''', or [[wikilinked]] as well.
- 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:
- up: will make the diagonal line go from bottom left to top right. The default is top left to bottom right.
- text: will put one or two characters of text inside the box. If using one character, a non-breaking space (
) 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|Oakland}}
{{Legend striped|green|gold|Green Bay}}
{{Legend striped|purple|black|''Baltimore''|up=yes}}
{{Legend striped|#003b7b|#fff|'''Indianapolis'''|outline=silver}}
{{Legend striped|#c80815|#e6be8a|[[San Francisco]]|border=2px solid black}}
Oakland
Green Bay
Baltimore
Indianapolis
Advanced use
{{Legend striped|#0c2340|#a2aaad|border=3px solid #78be20|Seattle}}
{{Legend striped|white|gold|border=3px solid maroon|text='''F'''|textcolor=maroon|Washington}}
Seattle
F Washington
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.
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.