monks/mask_size

The mask-size CSS property specifies the sizes of specified mask images. Mask image sizes can be fully or partially constrained to preserve their {{glossary(“aspect ratio”, “intrinsic aspect ratios”)}}.

Values

pub const auto_: #(String, String)
  • : Maintains the original aspect ratio of the mask source. When set for both the width and height, the origin size of the mask resource is used. Otherwise, auto scales the mask image in the corresponding direction such that its original aspect ratio is maintained.
pub const contain: #(String, String)
  • : Scales the mask image up or down, while preserving its aspect-ratio, making the mask as large as possible within its container without cropping or stretching it. If the mask image is smaller than the container, the mask will tile, or repeat, unless the {{cssxref(“mask-repeat”)}} property is set to no-repeat.
pub const cover: #(String, String)
  • : Scales the mask image to the smallest possible size to fill the container while preserving its aspect ratio. If the aspect ratio of the mask image differs from the element, it will be cropped vertically or horizontally.
pub const inherit: #(String, String)
pub const initial: #(String, String)
pub fn length(value: monks_of_style.Length) -> #(String, String)

length value of mask-size

pub fn raw(value: String) -> #(String, String)

Enter a raw string value for mask-size

pub const revert: #(String, String)
pub const revert_layer: #(String, String)
pub const unset: #(String, String)
pub fn var(variable: String) -> #(String, String)

Enter a variable name to be used for mask-size. It will be wrapped in var() and have -- prepended.

Search Document