mask-borderLimited availability
The mask-border CSS property sets how the edges of an element are masked. It is a shorthand for mask-border-outset, mask-border-repeat, mask-border-slice, mask-border-source, and mask-border-width.
Not yet supported in all major browsers — check the table and provide a fallback.
Browser support
DesktopChrome
✕Not supportedup to 155
Current: 155Edge
✕Not supportedup to 154
Current: 154Firefox
✕Not supportedup to 157
Current: 157Safari
1–17.1Not supported
17.2+Supportedsince Dec 11, 2023
Current: 27MobileChrome Android
✕Not supportedup to 155
Current: 155Firefox Android
✕Not supportedup to 157
Current: 157Safari iOS
1–17.1Not supported
17.2+Supportedsince Dec 11, 2023
Current: 27How to use
Not supported in Chrome, Edge, Firefox, Chrome Android, Firefox Android. Use feature detection below and provide a fallback (or a polyfill) for those browsers.
Example
Full syntax and examples are on MDN: mask-border.
Feature detection
CSS · check before using
@supports (mask-border: initial) {
/* styles that rely on mask-border */
}
/* or in JavaScript */
if (CSS.supports("mask-border", "initial")) {
// use it
}Sub-features
Support for each part of the feature (6). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| mask-border | ✕ | ✕ | ✕ | 17.2 | ✕ | ✕ | 17.2 |
| mask-border-outset | ✕ | ✕ | ✕ | 17.2 | ✕ | ✕ | 17.2 |
| mask-border-repeat | ✕ | ✕ | ✕ | 17.2 | ✕ | ✕ | 17.2 |
| mask-border-slice | ✕ | ✕ | ✕ | 17.2 | ✕ | ✕ | 17.2 |
| mask-border-source | ✕ | ✕ | ✕ | 17.2 | ✕ | ✕ | 17.2 |
| mask-border-width | ✕ | ✕ | ✕ | 17.2 | ✕ | ✕ | 17.2 |