Template:Rugby squad indented/doc

Purpose
This template is used to display rugby squad indented lists. A combination of padding, line spacing and indentation may be applied to present lists of players by position in the squad. The default style is a hanging indent whereby each rugby position juts out to the left with a corresponding list of players indented below.

style=text-indent:1em|



Conán O'Donnell

🇳🇿 Sam Prattley

Hencus van Wyk

The general method to achieve this is to first indent all items (move them right to have some margin on the left to work with) and then use the template to apply a negative indent to the positions as required.

Usage
Basic use: or

For example:
 * will display Prop with default


 * will display Prop with style.

The two unnamed parameters are:


 * text – the rugby position (or pseudo heading, etc.) to be displayed above a list of players in the rugby squad.


 * pad-indent – (optional) to set padding and indent of an equal and opposite amount.

Named parameters may optionally be used for more customised styling – see details below.

Description and parameters
{	"params": { "1": {			"label": "text", "description": "the rugby position to be displayed above a list of players in the squad", "type": "string", "required": true },		"2": {			"label": "pad-indent", "description": "used to apply padding and indent of an equal and opposite amount ", "example": "setting this to 2.5em will style: \"padding-left:2.5em;text-indent:–2.5em;\"", "type": "string", "default": "1em" },		"pl": { "description": "optional named parameter for customised styling of: padding-left", "example": "pl=2em", "default": "1em", "label": "padding-left", "type": "string" },		"ti": { "description": "optional named parameter for customised styling of: text-indent, typically set to the negative of the value used for padding-left", "example": "ti=-2em", "default": "-1em", "label": "text-indent", "type": "string" },		"fw": { "description": "optional named parameter for customised styling of: font-weight", "example": "fw=normal", "default": "bold", "label": "font-weight", "type": "string" },		"lh": { "description": "optional named parameter for customised styling of: line-height", "example": "lh=2", "default": "2.5", "label": "line-height", "type": "string" }	},	"description": "This template is used to display rugby squad player lists using a hanging indent style for each rugby position with a corresponding list of players indented below." }

Basic case
Using the various parameters to indent rugby positions within an unordered list (see the markup below):

Display

Markup

A sample squad
A somewhat more complete example is shown below, as might be used for a rugby squad (see also the markup at the bottom). The squad of players is displayed in two columns (for forwards and backs).
 * A narrow 0.6em hanging indent is used for each rugby position.
 * Players are presented in plainlist form with flags to indicate their national union under WR eligibility.
 * A notelist-ua section is placed at the bottom of the right column. Upper alpha is preferred to avoid confusion with backlinks.
 * Images may be added which display to the right on large screens and wrap below the squad for small screens.

Display

Markup