midp2 view-type

The midp2 view-type aligns all fitting items on a single row before starting a new row.


The midp2 view-type

.mainScreen {
	padding: 2;
	padding-left: 10;
	padding-right: 10;
	background {
		type: horizontal-stripes;
		first-top-color: rgb(165,190,247);
		second-top-color: white;
		first-bottom-color: blue;
		second-bottom-color: black;
	layout: horizontal-expand | horizontal-center | vertical-center;
	view-type: midp2;

Items with an expand layout will occupy the rest of a started row. You can force line breaks by using newline-after or newline-before layouts:

.myItem {
	layout: newline-before;

CSS attributes:

CSS Attribute  DefaultValuesExplanationSince
align-heights false true, false Specifies if all items should have the same height as the highest item in the respective row. You can exclude an item from aligning by setting its layout to vertical-shrink. 2.1
expand-items false true, false Expands the items within a screen or container to the width of the largest item - in contrast to the expand layout not the full available width is being used. 2.0
scroll-duration 300ms time The duration of a scroll animation. 2.3
view-type-auto-traversal false true, false Allows autotraversel for a container view. 2.0
view-type-left-x-offset 0 integer The number of pixels the left border of the view-type is shifted to the right (inside), negative values move the left border to the left (outside). 1.3
view-type-right-x-offset 0 integer The number of pixels the right border of the view-type is shifted to the left (inside), negative values move the right border to the right (outside). 1.3
view-type-sequential-traversal false true, false Defines if the cells of a table can only be traversered in sequential order. By default you can move to the next row by pressing down - when the sequential-traversal is enabled pressing down will move the focus to the next item instead. Only applicable when the columns attribute is being used. 2.0
view-type-top-y-offset 0 integer The number of pixels the top border of the view-type is shifted downwards, negative values move the top border to the upwards. 1.3