PositioningContext

@ExperimentalCoroutinesApi()
class PositioningContext(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

PositioningContext
Link copied to clipboard
js
fun PositioningContext(styleParams: StyleParams, target: StringBuilder)
basic context scope interface

Functions

bottom
Link copied to clipboard
js
fun bottom(value: ScaledValueProperty)
This function is used to define the positional behaviour of an element by the bottom property.
equals
Link copied to clipboard
js
open operator fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
js
open fun hashCode(): Int
horizontal
Link copied to clipboard
js
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.
left
Link copied to clipboard
js
fun left(value: ScaledValueProperty)
This function is used to define the positional behaviour of an element by the left property.
right
Link copied to clipboard
js
fun right(value: ScaledValueProperty)
This function is used to define the positional behaviour of an element by the right property.
top
Link copied to clipboard
js
fun top(value: ScaledValueProperty)
This function is used to define the positional behaviour of an element by the top property.
toString
Link copied to clipboard
js
open fun toString(): String
vertical
Link copied to clipboard
js
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

lgProperties
Link copied to clipboard
js
open override val lgProperties: StringBuilder
collects the properties for large screens
mdProperties
Link copied to clipboard
js
open override val mdProperties: StringBuilder
collects the properties for middle-sized screens
smProperties
Link copied to clipboard
js
open override val smProperties: StringBuilder
collects the properties for small screens
styleParams
Link copied to clipboard
js
val styleParams: StyleParams
basic context scope interface
xlProperties
Link copied to clipboard
js
open override val xlProperties: StringBuilder
collects the properties for extra-large screens