{"id":333543,"date":"2021-02-03T08:30:02","date_gmt":"2021-02-03T16:30:02","guid":{"rendered":"https:\/\/css-tricks.com\/?page_id=333543"},"modified":"2021-05-10T10:58:04","modified_gmt":"2021-05-10T17:58:04","slug":"mask-mode","status":"publish","type":"page","link":"https:\/\/css-tricks.com\/almanac\/properties\/m\/mask-mode\/","title":{"rendered":"mask-mode"},"content":{"rendered":"\n

The mask-mode<\/code> CSS property indicates whether the CSS mask layer image<\/a> is treated as an alpha mask or a luminance mask.<\/p>\n\n\n\n\n\n\n\n

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

Syntax<\/h3>\n\n\n
mask-mode: alpha | luminance | match-source<\/code><\/pre>\n\n\n\n

The property accepts one keyword value, or a comma-separated list of two or all three of the alpha<\/code>, luminance<\/code> and mask-source<\/code> values.<\/p>\n\n\n\n