CSS mask-border-outset Property
Description
The mask-border-outset property controls how far the pieces of a mask border image are positioned relative to the element’s border box, effectively shifting the mask-border region outward or inward from the border edge. It changes the placement of the mask’s edge slices so the decorative mask-border can visually extend beyond the border area or be pulled closer to the element’s interior without altering the element’s actual border-box dimensions. Because it affects only the mask image placement, using this property changes how the element is visually masked, not the element’s layout metrics (it does not change computed border, padding, margin, or affect reflow).
In practical terms, mask-border-outset is used together with the other mask-border properties to fine-tune how a mask-border image frames an element. It works in concert with mask-border-width and mask-border-slice (which define the thickness and the nine-slice regions of the mask image) and with mask-border-repeat (which controls how the border segments are tiled or stretched). By adjusting the outset, designers can ensure decorative corners and edges align correctly with varying border widths or create effects where the mask frame appears to hover outside the element.
Because the mask is applied as a compositing mask to the element’s painting, changing the outset can alter which parts of the element (background, border, and content) are revealed or concealed. Be mindful that if mask areas extend beyond the element’s border box, those parts may be subject to clipping by ancestor overflow rules or interact with stacking and pointer-event behavior in ways that differ from a simple border image. For cases where a similar visual effect is desired for the element border itself rather than the mask, authors often compare and coordinate with border-image-outset to achieve consistent framing between masking and border imagery.
Definition
- Initial value
- 0
- Applies to
- all elements; In SVG, it applies to container elements excluding the <defs> element and all graphics elements
- Inherited
- no
- Computed value
- as specified, but with relative lengths converted into absolute lengths
- Animatable
- yes
- JavaScript syntax
- object.style.maskBorderOffset
Syntax
mask-border-offset: <length> | auto;
Values
- <length>Any valid CSS length unit (e.g., px, em, rem). Negative values are allowed, which draws the mask inside the border box.
- autoThe default value. The offset is automatically calculated based on the mask-border sizing and the element’s box.
Example
Browser Support
The following information will show you the current browser support for the CSS mask-border-outset property. Hover over a browser icon to see the version that first introduced support for this CSS property.
This property is supported in some modern browsers, but not all.
Desktop
Tablets & Mobile
Last updated by CSSPortal on: 1st January 2026
