User:Ring/Userbox/doc

Parameters

 * width (Default: 242px)
 * overall width of userbox


 * height (Default: 49px)
 * overall height of the userbox


 * margin (Default: 1)
 * outer distance to neighboring elements in pixel


 * float (Default: left)
 * floating behaviour; one of left, right or none


 * border-width, border-s (Default: 1px)
 * width of outer border


 * border-color, border-c (Default: )
 * border color (equals id-c if that is specified but neither border-c nor 1 are)


 * border-style (Default: solid)
 * style of the outer border, e.g. dashed or dotted


 * logo, id (Default: id)
 * the actual "logo" or logo-text; if empty, the logo area will be hidden


 * id-type (Default: text)
 * one of text, img or skill


 * id-crop (Default: 1 for img, 3 for skill)
 * pixel to "cut off" around images


 * logo-background, id-c (Default: )
 * background of the logo area (and of borders unless otherwise specified)


 * logo-color, id-fc (Default: black)
 * font color in the logo area


 * logo-border, id-b
 * if specified, the id area will have a right border with specified width


 * logo-size, id-s (Default: 14pt)
 * font size in the logo area


 * logo-padding, id-p (Default: 1pt for text, 0 for img/skill)
 * padding in the logo box


 * logo-line-height, id-lh (Default: 1.25em)
 * line height in the logo box


 * logo-valign, id-va (Default: middle)
 * vertical alignment of logo-text or image; e.g. top or bottom


 * logo-halign, id-ha (Default: center)
 * horizontal alignment of logo-text or image; one of left, center, right or justify


 * logo-weight, id-w (Default: bold)
 * defines boldness (font weight) of the text in the logo area


 * logo-other-param, id-op
 * other CSS properties you want to specify


 * info (Default: info)
 * the actual text/image in the info part


 * info-background, info-c (Default: )
 * background color of the info area


 * info-size, info-s (Default: 8pt)
 * font size in the info area


 * info-color, info-fc (Default: black)
 * font color in the info area


 * info-padding, info-p (Default: 4pt)
 * padding in the info area, including units


 * info-line-height, info-lh (Default: 1.25em)
 * line height in the info


 * info-valign, info-va (Default: middle)
 * vertical alignment of content in the info area; e.g. top or bottom


 * info-halign, info-ha (Default: left)
 * horizontal alignment of content in the info area; one of left, center, right or justify


 * info-other-param, info-op
 * other CSS properties you want to specify

Dimensions
Basically, there are two modes of how to specify dimensions for border, margin, padding (id), height and width:


 * 1) Not specifying any units at all
 * Height and width of the box will include padding, margin and border. The image size will be calculated taking padding into account (if applicable). All units concerning border size, height, width, margin or padding are in pixel (px) by default.
 * 1) Specifying all units
 * As soon as you specify units in either one of the parameters, calculation of the total dimensions fails (or, at least, yields strange results). Then:
 * width defaults to 238px and specifies the total width of the box excluding border and margin
 * height defaults to 45px and might or might not specify the height of the box and width of the logo area, excluding border and margin, not taking padding into account
 * image cropping will most likely fail
 * This should then resemble the behaviour of the original userbox template.

Note: Although logo padding has a default value of 1pt for text, as soon as you specify an integer without units it will be in pixel. Also, info padding is not important for any of that and always specified including units.

id-type &amp; -crop
The following types are available:


 * 1) text
 * can be omitted; places the text specified via id or logo in the corresponding box; ignores cropping
 * 1) img
 * id or logo should be a name of an image (not the wiki markup, just the name); If id-crop is set (which it is by default), some pixel will be cut off around the image; If logo-size/id-s is specified, that value will be used for image size (not recommended, though)
 * 1) skill
 * convenience type; id/logo should be the name of a skill image; should remove the black or gold borders around the image


 * Default padding for img/skill is 0! (1pt for text)
 * img/skill and crop currently work with square images only; Additional parameters for non-square images might be implemented (or DIY...)
 * Consider using logo-border/id-b with images, as without it the right padding might look less than the left one

Additions

 * Support for (skill) images
 * Support for border between id and info areas
 * Automatic dimension calculation
 * More properties can be specified

Changes

 * Bold text implemented as CSS property as opposed to bold-tag; therefore, it is safe to put block elements in id/logo field
 * Some named parameters override unnamed counterparts
 * Some differences in specification of units

Plans

 * Support for right (second) id cell
 * Alternate crop mode
 * Better image size support