Design
The Layout system implements basic page divisions and broad layout such as columns. It is part of the system which ultimately implements the grid.
Layout is a workhorse subcomponent and is used as part of several other components.
On a large screen, groups will be rendered as 'rows' and items as 'columns'; while on a small screen the items will simply be linearised (appearing one after the other, in source order).
Code
Example | Code |
---|---|
Base patternThe flexible grid works by combining an Items contain content - panels, messages, etc. Items contain content - panels, messages, etc. |
|
By default the group's items will be set to an even width and the content left-aligned. That means if there are two items in a group they will be 50% each, four will be 25% each, etc. Unlike a fixed grid which needs all spacing defined explicitly (eg. 1/4 must be accompanied by 3/4), the flexible grid will simply lay out the currently-rendered items. The number of items determines the propotional widths. If a single item in the group has a set width, the rest of the items will divide the remaining space evenly. Item fixed at 220px. Remaining items are fluid width. Item fixed at 220px. Remaining items are fluid width. Remaining items are fluid width. |
|
In split groups the content 'splits' away from the centre. The first item will be left-aligned, the last will be right-aligned and all items between the two will be centre-aligned. Split groups are commonly used with two or three items - a left/right split, and a left/right split plus some centre-aligned content in the middle. It is rare to use split groups in other configurations. Item. Item. Item. Item. Item. |
|
Although less common, groups can also include a header: Group HeaderItem. Item. |
|