Is it wrong to use the mask-image property? Is it obsolete?

I've been learning how to use the mask-image property but without the -webkit- prefix it doesn't work in Chrome.
No description
11 Replies
Chaves
Chaves14mo ago
No description
Mannix
Mannix14mo ago
it is not obsolete chrome for some reason requires the use of the webkit instead of the normal one
Chaves
Chaves14mo ago
Are there other properties that also only work in Chrome using the prefix? Common Properties
Mannix
Mannix14mo ago
the one that comes to mind is for styling scrollbars and that's all chromium based browsers not just chrome 🙂
Jochem
Jochem14mo ago
when in doubt, you can always check caniuse.com https://caniuse.com/mdn-css_properties_mask-image
Chaves
Chaves14mo ago
ἔρως
ἔρως14mo ago
personally, if i was you, i would use clip-path instead
Zoë
Zoë14mo ago
I have a bunch of clip paths ready to go, including a heart https://codepen.io/z-/pen/VwEPZjr
ἔρως
ἔρως14mo ago
and you can change them at will, without having to upload new images in fact, i would even use an svg for this, so everything is still a single image oh, and you can transition between 2 clip-paths with the polygon function
capt_uhu
capt_uhu14mo ago
FYI mask-image is part of Interop2023 so should finally be cross browser consistent without prefixes by the end of the year. Chrome just started working on it this week.
ἔρως
ἔρως14mo ago
but according to mdn, clip-path is more efficient than mask-image, which is one of the reasons why i recommended it (although i didnt mention this before)
Want results from more Discord servers?
Add your server