PositioningContext

@ExperimentalCoroutinesApi
class PositioningContext(val styleParams: StyleParams, target: StringBuilder) : StyleParams

This context class enables the definition of positioning properties for the four directions of top, right, bottom and left and convenience functions for defining the horizontal or vertical aspects at once.

This enables to define the position as follows:

position { /* it == PositionContext.() */
absolute { /* it == PositioningContext.() */
top { large } // use predefined property of the theme
right { "2em" } // use a custom value
}
}

Parameters

styleParams

basic context scope interface

target

the defined output StringBuilder to write the generated CSS into

Constructors

Link copied to clipboard
fun PositioningContext(styleParams: StyleParams, target: StringBuilder)

Functions

Link copied to clipboard
fun bottom(value: ScaledValueProperty)

This function is used to define the positional behaviour of an element by the bottom property.

Link copied to clipboard
fun horizontal(value: ScaledValueProperty)

This convenience function is used to define the horizontal positional behaviour of an element by the right and left properties at once.

Link copied to clipboard
fun left(value: ScaledValueProperty)

This function is used to define the positional behaviour of an element by the left property.

Link copied to clipboard
fun right(value: ScaledValueProperty)

This function is used to define the positional behaviour of an element by the right property.

Link copied to clipboard
fun top(value: ScaledValueProperty)

This function is used to define the positional behaviour of an element by the top property.

Link copied to clipboard
fun vertical(value: ScaledValueProperty)

This convenience function is used to define the vertical positional behaviour of an element by the top and bottom properties at once.

Properties

Link copied to clipboard
open override val lgProperties: StringBuilder

collects the properties for large screens

Link copied to clipboard
open override val mdProperties: StringBuilder

collects the properties for middle-sized screens

Link copied to clipboard
open override val smProperties: StringBuilder

collects the properties for small screens

Link copied to clipboard
val styleParams: StyleParams
Link copied to clipboard
open override val xlProperties: StringBuilder

collects the properties for extra-large screens