{"id":331047,"date":"2020-12-18T13:11:00","date_gmt":"2020-12-18T21:11:00","guid":{"rendered":"https:\/\/css-tricks.com\/?page_id=331047"},"modified":"2021-05-27T12:22:03","modified_gmt":"2021-05-27T19:22:03","slug":"mask-clip","status":"publish","type":"page","link":"https:\/\/css-tricks.com\/almanac\/properties\/m\/mask-clip\/","title":{"rendered":"mask-clip"},"content":{"rendered":"\n

The mask-clip<\/code> CSS property is part of the CSS Masking Module Level 1<\/a> specification, and sets the mask painting area. It literally clips the background area of an element and defines which areas show through the mask: border, padding or content box<\/a>. It\u2019s sort of like putting the frame on a photo, showing only the parts of the photo that aren\u2019t covered by the frame. Only, in this case, we\u2019re setting what gets clipped using CSS Box Model values.<\/p>\n\n\n\n\n\n\n\n

.element {\n  mask-image: url(sun.svg);\n  mask-clip: padding-box;\n}<\/code><\/pre>\n\n\n\n