'CSS Mask not working on firefox

I'm trying to show a SVG image using mask but in Firefox it isn't appearing. My CSS class is as follows:

.myClass {
    -webkit-mask: url('../img/arrow-down.svg') no-repeat 100% 100%;
    mask: url('../img/arrow-down.svg') no-repeat 100% 100%;
    background: rgba(67, 67, 67, 0.8);
    width: 1.15em;
    height: 1em;
}

And html code is just a simple:

<div class="myClass"></div>

In chrome, my masked arrow-down.svg is showing nicely but in firefox a div with specified background is appearing. Any idea on how to solve my problem?



Solution 1:[1]

For anyone who may still be wandering, the following works fine for me, by inserting the encoded svg string as a data uri (not base64!):

.my-class {
  --svg-icon: url('data:image/svg+xml;utf8,...');
  mask: var(--svg-icon) no-repeat;
  mask-size: 100% 100%;
  -webkit-mask: var(--svg-icon) no-repeat;
  -webkit-mask-size: 100% 100%;
  background-color: currentColor;
  height: 1em;
  width: 1em;
}

I was able to pull this off thanks to some nice tutorials/examples by Anthony Fu and Noah Blon:

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 cmlima