monks/mask_origin
The mask-origin CSS property sets the origin of a mask. This property determines the mask positioning area: the area within which a mask image is positioned. HTML elements can have masks contained within their content border box, padding box, or content box, whereas SVG elements (which don’t have the associated CSS layout boxes) can have masks contained inside their fill, stroke, or view box.
For elements rendered as multiple boxes, such as a {{htmlelement(“span”)}} of text that spans more than one line, the mask-origin property specifies which boxes the {{cssxref(“box-decoration-break”)}} property operates on to determine the mask positioning area.
Values
pub const border_box: #(String, String)
- : The position is relative to the border box.
pub const content_box: #(String, String)
- : The position is relative to the content box.
pub const fill_box: #(String, String)
- : The position is relative to the object bounding box.
pub const padding_box: #(String, String)
- : The position is relative to the padding box.
pub const revert_layer: #(String, String)
pub const stroke_box: #(String, String)
- : The position is relative to the stroke bounding box.
pub fn var(variable: String) -> #(String, String)
Enter a variable name to be used for mask-origin.
It will be wrapped in var() and have -- prepended.
pub const view_box: #(String, String)
- : Uses the nearest SVG viewport as reference box. If a {{svgattr(“viewBox”)}} attribute is specified for the element creating the SVG viewport, the reference box is positioned at the origin of the coordinate system established by the
viewBoxattribute and the dimension of the reference box is set to the width and height values of theviewBoxattribute.There are three non-standard values that are shortcuts for standard<coord-box>values:contentis an alias forcontent-box,paddingis an alias forpadding-box, andborderis an alias forborder-box.