Template:Userbox/doc

This is the documentation subpage for the parent Template:Userbox page.
- Usage
- Useful userbox template.
- Basic syntax
- Parameters
- Alternate parameters are those using shorter names, or using the legacy positional (numbered) parameters. They are tested and used only if they are not empty, in the indicated order always after the long parameter name tested first. Otherwise the default value in the description is used.
- Note that the legacy parameter 1 can be used to select the same color for the logo or id background and the for outer border of the box.
Parameter | Alternate parameters | Description and default value |
---|---|---|
Basic parameters | ||
logo-background | 1, id-c | optional (#DDD by default) |
info-background | 2, info-c | optional (#EEE by default) |
logo | 3, id | mandatory (displays "id" otherwise) |
info | 4 | mandatory (displays "info" otherwise) |
Optional styles for the outer box | ||
float | optional (left by default) | |
border-width | border-s | optional (value in px, 1 by default) |
border-color | border-c, 1 | optional (#CCC by default) |
style | optional (empty by default) | |
Optional styles for the logo or id | ||
logo-size | 5, id-s | optional (value in pt, 14 by default; this is the font size for showing the ID, not used with a graphic logo) |
logo-line-height | id-lh | optional (1.25 by default; this is the line-height to render the text of the ID, not used with a graphic logo) |
logo-color | id-fc | optional (#000 by default; this is the foreground color to render the text of the ID, not used with a graphic logo) |
logo-padding | id-p | optional (1px by default) |
logo-width | id-w | optional (value in px, 46 by default; this is a minimum value, the ID may extend this width if it does not fit at the given font size) |
logo-height | id-h | optional (value in px, 46 by default; should be even for correct scaling with Hi-DPI displays or zooms) |
logo-other-param | id-op | optional (empty by default) for the container box |
id-style | optional (empty by default) for the id or logo span | |
Optional styles for the info part | ||
info-size | info-s | optional (value in pt, 8 by default) |
info-line-height | info-lh | optional (normal by default) |
info-color | info-fc | optional (#000 by default) |
info-padding | info-p | optional (0 2px by default) |
info-other-param | info-op | optional (empty by default) |