opacity-and-gradient-01.svg 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <!--
  2. Any copyright is dedicated to the Public Domain.
  3. http://creativecommons.org/publicdomain/zero/1.0/
  4. -->
  5. <svg xmlns="http://www.w3.org/2000/svg" version="1.1">
  6. <title>Testcase for opacity on elements referencing a gradient</title>
  7. <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=357163 -->
  8. <defs>
  9. <linearGradient id="lime" gradientUnits="userSpaceOnUse">
  10. <stop stop-color="lime"/>
  11. </linearGradient>
  12. <linearGradient id="red" gradientUnits="userSpaceOnUse">
  13. <stop stop-color="red"/>
  14. </linearGradient>
  15. </defs>
  16. <rect width="100%" height="100%" fill="red"/>
  17. <!-- Create the "pass" rect using a gradient so the testcase doesn't seem to
  18. pass if gradients are not supported -->
  19. <rect width="100%" height="100%" fill="url(#lime)"/>
  20. <!-- test 'opacity' -->
  21. <rect width="25%" height="100%" fill="url(#red)" opacity="0"/>
  22. <!-- test 'fill-opacity' -->
  23. <rect x="25%" width="25%" height="100%" fill="url(#red)" fill-opacity="0"/>
  24. <!-- test 'stroke-opacity' -->
  25. <line x1="75%" x2="75%" y2="100%" stroke="url(#red)" stroke-width="50%" stroke-opacity="0"/>
  26. </svg>