monks/background_size
The background-size CSS property sets the size of the element’s background image.
The image can be left to its natural size, stretched, or constrained to fit the available space.
Spaces not covered by a background image are filled with the {{cssxref(“background-color”)}} property, and the background color will be visible behind background images that have transparency/translucency.
Values
pub const auto_: #(String, String)
- : Scales the background image in the corresponding direction such that its intrinsic proportions are maintained.
pub const contain: #(String, String)
- : Scales the image as large as possible within its container without cropping or stretching the image. If the container is larger than the image, this will result in image tiling, unless the {{cssxref(“background-repeat”)}} property is set to
no-repeat.
pub const cover: #(String, String)
- : Scales the image (while preserving its ratio) to the smallest possible size to fill the container (that is: both its height and width completely cover the container), leaving no empty space. If the proportions of the background differ from the element, the image is cropped either vertically or horizontally.
pub fn length(value: monks_of_style.Length) -> #(String, String)
length value of background-size
pub const revert_layer: #(String, String)