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
ChavesOP15mo ago
No description
Mannix
Mannix15mo ago
it is not obsolete chrome for some reason requires the use of the webkit instead of the normal one
Chaves
ChavesOP15mo ago
Are there other properties that also only work in Chrome using the prefix? Common Properties
Mannix
Mannix15mo ago
the one that comes to mind is for styling scrollbars and that's all chromium based browsers not just chrome 🙂
Jochem
Jochem15mo ago
when in doubt, you can always check caniuse.com https://caniuse.com/mdn-css_properties_mask-image
Chaves
ChavesOP15mo ago
ἔρως
ἔρως15mo ago
personally, if i was you, i would use clip-path instead
Zoë
Zoë15mo ago
I have a bunch of clip paths ready to go, including a heart https://codepen.io/z-/pen/VwEPZjr
ἔρως
ἔρως15mo 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_uhu15mo 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.
ἔρως
ἔρως15mo 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