{"id":340283,"date":"2021-05-10T11:02:28","date_gmt":"2021-05-10T18:02:28","guid":{"rendered":"https:\/\/css-tricks.com\/?page_id=340283"},"modified":"2022-06-14T10:07:52","modified_gmt":"2022-06-14T17:07:52","slug":"mask-composite","status":"publish","type":"page","link":"https:\/\/css-tricks.com\/almanac\/properties\/m\/mask-composite\/","title":{"rendered":"mask-composite"},"content":{"rendered":"\n

The mask-composite<\/code> CSS property allows us to combine a mask layer image<\/a> with the mask layers below it.<\/p>\n\n\n\n

.element {\n  mask-composite: subtract;\n}<\/code><\/pre>\n\n\n\n

When there are multiple mask layer images, they need to be composited into one final mask layer. mask-compositespecifies how mask layers with different shapes are combined into a single image. Think of it like combining layers in an image editing app, like Photoshop, Figma or Sketch, where you have controls that set how the layers are combined.<\/p>\n\n\n\n