D
D
Dealaxer2017-10-07 19:42:07
HTML
Dealaxer, 2017-10-07 19:42:07

LinearGradient SVG not working in new Firefox, does it happen for everyone?

People, hello everyone.
After updating mozilla to the latest version (56), the linear gradient animation is no longer translucent at the edges, now the sheen is a solid color.
The code:

<defs>
   <linearGradient id="shine" x1="0%" y1="0%" x2="100%" y2="100%">
  <stop offset="0.04" style="stop-color:#FFFFFF;stop-opacity:0">
        <animate id="an1" attributeName="offset" dur="1.5s" values="0.04;0.94" begin="3s;an1.end+3s" repeatCount="indefinite" />
    </stop>
    <stop offset="0.08" style="stop-color:#FFFFFF;stop-opacity:0.7">
        <animate id="an2" attributeName="offset" dur="1.5s" values="0.2;0.98" begin="3s;an2.end+3s" repeatCount="indefinite" />
    </stop>
    <stop offset="0.10" style="stop-color:#FFFFFF;stop-opacity:0">
        <animate id="an3" attributeName="offset" dur="1.5s" values="0.30;1" begin="3s;an3.end+3s" repeatCount="indefinite" />
    </stop>
   </linearGradient>
   

    <mask id="myShiningMask" >
      <rect x="0" y="0" width="100%" height="100%" fill="url(#shine)" />
    </mask>
</defs>

In all other browsers, the way the animation worked, it still works. Maybe something has changed in Mozilla?
Who is in the course?
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dealaxer, 2017-10-09
@Dealaxer

In short, I don’t know what this is connected with, but I think that with the mask tag and its application, the issue was resolved as follows:
earlier, to apply animation to the <g><path> object, the mask="url(#myShiningMask)" attribute was used.
Now code

<mask id="myShiningMask" >
      <rect x="0" y="0" width="100%" height="100%" fill="url(#shine)" />
    </mask>

I threw it out of SVG and instead of the mask attribute, I directly applied fill="url(#shine)" .
The animation played in all browsers the same with transparency along the contour of the object without a mask!
It's not clear why the mask attribute didn't go on the new Firefox.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question