PositionContext

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

This context class acts as an intermediate context to set the position of an element and to specify the actual positioning concerning the sides distances too.

It offers primarily functions to define the type of the position, like absolute or relative. Further more those functions opens another subcontext named PositioningContext, which brings functions to ultimately define the side distances.

Parameters

styleParams

basic context scope interface

target

the defined output StringBuilder to write the generated CSS into

Constructors

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

Functions

Link copied to clipboard
fun absolute(value: PositioningContext.() -> Unit)

This function sets the `absolute` value for the position property and opens up the PositioningContext in order to enable the definition of side distances.

Link copied to clipboard
fun fixed(value: PositioningContext.() -> Unit)

This function sets the `fixed` value for the position property and opens up the PositioningContext in order to enable the definition of side distances.

Link copied to clipboard
fun relative(value: PositioningContext.() -> Unit)

This function sets the `relative` value for the position property and opens up the PositioningContext in order to enable the definition of side distances.

Link copied to clipboard
fun sticky(value: PositioningContext.() -> Unit)

This function sets the `sticky` value for the position property and opens up the PositioningContext in order to enable the definition of side distances.

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 static: Unit

This property sets the `static` value for the position property.

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

collects the properties for extra-large screens