size

fun size(value: BackgroundSizes.() -> BackgroundSizeProperty)

This function is used to set the background-size property. Predefined values are offered by BackgroundSizes.

This functions only sets one value.

Example call

background {
size { cover }
}

If you want to specify both dimensions independently, use the sizes function in order to open a nested scope.

See also

Parameters

value

extension function parameter to bring the predefined position values in BackgroundSizes into the scope of the functional expression