mask-origin
Quick Summary for mask-origin
The mask-origin CSS property sets the origin of a mask.
Code Usage for mask-origin
/* Keyword values */ mask-origin: content-box; mask-origin: padding-box; mask-origin: border-box; mask-origin: margin-box; mask-origin: fill-box; mask-origin: stroke-box; mask-origin: view-box;  /* Multiple values */ mask-origin: padding-box, content-box; mask-origin: view-box, fill-box, border-box;  /* Non-standard keyword values */ -webkit-mask-origin: content; -webkit-mask-origin: padding; -webkit-mask-origin: border;  /* Global values */ mask-origin: inherit; mask-origin: initial; mask-origin: revert; mask-origin: unset; 
More Details for mask-origin

mask-origin

The mask-origin CSS property sets the origin of a mask.

/* Keyword values */ mask-origin: content-box; mask-origin: padding-box; mask-origin: border-box; mask-origin: margin-box; mask-origin: fill-box; mask-origin: stroke-box; mask-origin: view-box;  /* Multiple values */ mask-origin: padding-box, content-box; mask-origin: view-box, fill-box, border-box;  /* Non-standard keyword values */ -webkit-mask-origin: content; -webkit-mask-origin: padding; -webkit-mask-origin: border;  /* Global values */ mask-origin: inherit; mask-origin: initial; mask-origin: revert; mask-origin: unset; 

For elements rendered as a single box, this property specifies the mask positioning area. In other words, this property specifies the origin position of an image specified by the mask-image CSS property. For elements rendered as multiple boxes, such as inline boxes on several lines or boxes on several pages, it specifies which boxes box-decoration-break operates upon to determine the mask positioning area.

Syntax

One or more of the keyword values listed below, separated by commas.

Values

content-box

The position is relative to the content box.

padding-box

The position is relative to the padding box. For single boxes 0 0 is the upper left corner of the padding edge, 100% 100% is the lower right corner.

border-box

The position is relative to the border box.

margin-box

The position is relative to the margin box.

fill-box

The position is relative to the object bounding box.

stroke-box

The position is relative to the stroke bounding box.

view-box

Uses the nearest SVG viewport as reference box. If a 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 viewBox attribute and the dimension of the reference box is set to the width and height values of the viewBox attribute.

content

Same as content-box.

padding

Same as padding-box.

border

Same as border-box.

Formal definition

Initial valueborder-box
Applies toall elements; In SVG, it applies to container elements excluding the defs element and all graphics elements
Inheritedno
Computed valueas specified
Animation typediscrete

Formal syntax

<geometry-box>#

where <geometry-box> = <shape-box> | fill-box | stroke-box | view-box

where <shape-box> = <box> | margin-box

where <box> = border-box | padding-box | content-box

Examples

Setting mask origin to border-box

Try some of the other possible values by updating the CSS in the box below.

Specifications

Specification
CSS Masking Module Level 1 # the-mask-origin

See also

Clipping and Masking in CSS

Last modified: Aug 12, 2021, by MDN contributors

Select your preferred language English (US)DeutschEspañolFrançais日本語 Change language

No Items Found.

Add Comment
Type in a Nick Name here
 
Other Categories in CSS
css
Search CSS
Search CSS by entering your search text above.
Welcome

This is my test area for webdev. I keep a collection of code here, mostly for my reference. Also if i find a good link, i usually add it here and then forget about it. more...

Subscribe to weekly updates about things i have added to the site or thought interesting during the last week.

You could also follow me on twitter or not... does anyone even use twitter anymore?

If you found something useful or like my work, you can buy me a coffee here. Mmm Coffee. ☕

❤️👩‍💻🎮

🪦 2000 - 16 Oct 2022 - Boots
Random Quote


seren spirit :(
Random CSS Property

float

The float CSS property places an element on the left or right side of its container, allowing text and inline elements to wrap around it. The element is removed from the normal flow of the page, though still remaining a part of the flow (in contrast to absolute positioning).
float css reference