Background Context
This context class enables the definition of background related styling facilities.
It provides topic oriented functions to set properties directly and in some cases offers functions to enter sub-contexts in order to specify related property values in a readable, grouped manner (for example positions or sizes)
Have a look at the following example to get an impression of the capabilities this class offers:
background { /* it == BackgroundContext.() -> Unit */
image { "https://via.placeholder.com/150/?text=Klein" }
repeat { repeatX }
positions { /* sub context */
horizontal { center }
vertical { center }
}
}Parameters
basic context scope interface
the defined output StringBuilder to write the generated CSS into
Constructors
Functions
This function is used to set the background-attachment property. Predefined values are offered by BackgroundAttachments.
This function is used to set the background-blend-mode property. Predefined values are offered by BackgroundBlendModes.
This function is used to set the background-clip property. Predefined values are offered by BackgroundBoxValues.
This function is used to set a color for the background-color property.
This function is used to set a URL for the background-image property.
This function is used to set the value for the background-image property to `none`.
This function is used to set the background-origin property. Predefined values are offered by BackgroundBoxValues.
This function is used to set the background-position property. Predefined values are offered by BackgroundPositions.
This function opens a sub scope in order to set the two dimensions (horizontal and vertical) of the background position independently.
This function is used to set the background-repeat property. Predefined values are offered by BackgroundRepeats.
This function is used to set the background-size property. Predefined values are offered by BackgroundSizes.
This function opens a sub scope in order to set the two dimensions (horizontal and vertical) of the background size independently.