Background Context
class BackgroundContext(styleParams: StyleParams, target: StringBuilder) : StyleParams
Content copied to clipboard
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
styleParams
basic context scope interface
target
the defined output StringBuilder to write the generated CSS into
Constructors
BackgroundContext
Link copied to clipboard
basic context scope interface
Functions
attachment
Link copied to clipboard
fun attachment(value: BackgroundAttachments.() -> BackgroundAttachmentProperty)
Content copied to clipboard
This function is used to set the background-attachment property.
blendMode
Link copied to clipboard
fun blendMode(value: BackgroundBlendModes.() -> BackgroundBlendModeProperty)
Content copied to clipboard
This function is used to set the background-blend-mode property.
clip
Link copied to clipboard
color
Link copied to clipboard
This function is used to set a color for the background-color property.
image
Link copied to clipboard
This function is used to set a URL for the background-image property.
origin
Link copied to clipboard
position
Link copied to clipboard
fun position(value: BackgroundPositions.() -> BackgroundPositionProperty)
Content copied to clipboard
This function is used to set the background-position property.
positions
Link copied to clipboard
repeat
Link copied to clipboard
size
Link copied to clipboard
sizes
Link copied to clipboard
Properties
lgProperties
Link copied to clipboard
mdProperties
Link copied to clipboard
smProperties
Link copied to clipboard
xlProperties
Link copied to clipboard