position

open fun position(value: PositionContext.() -> Unit)

This function sets the position CSS property of an element for all media devices at once.

the actual definition is done within a dedicated context class PositionContext. This class offers functions to specify the position like PositionContext.absolute for example.

example calls:

position {
absolute {
// call functions from the [PositioningContext] for setting side distances
}
}

position { static }

Parameters

value

extension function parameter in order to bring PositionContext functions into scope.

open fun position(sm: PositionContext.() -> Unit? = null, md: PositionContext.() -> Unit? = null, lg: PositionContext.() -> Unit? = null, xl: PositionContext.() -> Unit? = null)

This function sets the position CSS property of an element for each media device independently.

the actual definition is done within a dedicated context class PositionContext.

example call:

position(
sm = {
absolute {
// call functions from the [PositioningContext] for setting side distances
}
},
lg = {
relative {
// call functions from the [PositioningContext] for setting side distances
}
}
)

Parameters

lg

extension function parameter in order to bring PositionContext functions into scope for large media devices.

md

extension function parameter in order to bring PositionContext functions into scope for medium sized media devices.

sm

extension function parameter in order to bring PositionContext functions into scope for small media devices.

xl

extension function parameter in order to bring PositionContext functions into scope for extra large media devices.